Hatch


Author
Message
Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1

works fine, however when I try to set the texture mapping scale, there is no effect.  Here is the code

 

NHatchFillStyle hatchStyle = new NHatchFillStyle(HatchStyle.HorizontalBrick, Color.White, Color.Black);

NTextureMappingStyle mappingStyle = new NTextureMappingStyle();

mappingStyle.MapMode = MapMode.RelativeToViewer;

mappingStyle.MapLayout = MapLayout.Tiled;

mappingStyle.HorizontalScale = 10.0f;

mappingStyle.VerticalScale = 10.0f;

hatchStyle.TextureMappingStyle = mappingStyle;

NStyle.SetFillStyle(myShape, hatchStyle);

It shows no effect on applying the scale


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

The style of a shape is set to null by default and that's why we recommend when applying styles you always use the following syntax:

NStyle.SetFillStyle(shape, fillStyle);



Best Regards,
Nevron Support Team


Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
I try to create a composite shape, I wonder if it is possible to apply a hatch to an NRectangularPath, I keep getting error when I try it.

Something like this

NRectanglePath myShape= new NRectanglePath(150, 475, 300, 25);
myShape.Style.FillStyle = new NHatchFillStyle(HatchStyle.HorizontalBrick, Color.White, Color.Black);//error here
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search