custom Texture for filling area

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Queue Moderators

Post Reply
peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

custom Texture for filling area

Post by peppemath » Fri Jan 18, 2019 11:47 am

Generally when I draw a series HighLow or bands they can choose the fill color even with a gradient.
Is it possible to fill the area not with a color but with a pattern / texture like the one in the picture?
Attachments
patterntexture.png
patterntexture.png (34.62 KiB) Viewed 28669 times

ArctionKestutis
Posts: 549
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Post by ArctionKestutis » Mon Jan 21, 2019 3:16 pm

Yes, it is possible to use bitmap fill. All the objects with Fill property support Fill.Style=Bitmap. Afterwards just add image, set layout etc. (Fill.Bitmap.Image, Fill.Bitmap.Layout etc.).

Hope this helps.

peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Post by peppemath » Thu Jan 24, 2019 3:02 pm

Grazie! Perfect!
Next a screenshot of my demo
But I still have a problem; in the example I used a band and I can not re-fill the whole area vertically; I tried to change the three values of BitmapFillLayout but not iresco to get what I want. Need to set another?
Attachments
patterntexture002.png
patterntexture002.png (70.51 KiB) Viewed 28636 times

peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Post by peppemath » Fri Jan 25, 2019 7:26 am

Pardon, I was wrong to create the texture image; now everything is ok by setting BitmapFillLayout.Tile
Attachments
patterntexture002b.png
patterntexture002b.png (65.5 KiB) Viewed 28633 times

ArctionKestutis
Posts: 549
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Post by ArctionKestutis » Fri Jan 25, 2019 7:37 am

Setting Fill.Bitmap.Layout to 'Tile' or 'Stretch' will fill all object's area. Wrong pattern (as you noticed already) or 'Center' option could make fill incomplete.

peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Post by peppemath » Fri Jan 25, 2019 8:12 am

PERFECT!!!!!!
Grazie!!!
Attachments
patterntexture002c.png
patterntexture002c.png (69.8 KiB) Viewed 28631 times

peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Post by peppemath » Fri Jan 25, 2019 9:21 am

Excuse me again a question: the grid that I created is a png image that is transparent within the individual squares. When it draws, however, there is always a background color, how can you eliminate it?

ArctionKestutis
Posts: 549
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Post by ArctionKestutis » Fri Jan 25, 2019 12:01 pm

Is it not ?

Code: Select all

Fill.Bitmap.ImageTintColor

peppemath
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Post by peppemath » Mon Jan 28, 2019 10:17 am

uhm, doesn't work :(

But it works with
series1.Fill.Color = Colors.Transparent;
series1.Fill.GradientColor = Colors.Transparent;
Attachments
patterntexture002e.png
patterntexture002e.png (90.44 KiB) Viewed 28605 times

Post Reply