Profile Picture

Hatch

Posted By Volvick Derose 14 Years Ago
Author
Message
Volvick Derose
Posted 14 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 12 Years Ago
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
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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
Posted 14 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 12 Years Ago
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



Similar Topics


Reading This Topic