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.

custom Texture for filling area

Postby 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 1410 times
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Postby 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.
ArctionKestutis
 
Posts: 363
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Postby 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 1377 times
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Postby 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 1374 times
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Postby 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.
ArctionKestutis
 
Posts: 363
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Postby peppemath » Fri Jan 25, 2019 8:12 am

PERFECT!!!!!!
Grazie!!!
Attachments
patterntexture002c.png
patterntexture002c.png (69.8 KiB) Viewed 1372 times
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Postby 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?
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am

Re: custom Texture for filling area

Postby ArctionKestutis » Fri Jan 25, 2019 12:01 pm

Is it not ?
Code: Select all
Fill.Bitmap.ImageTintColor
ArctionKestutis
 
Posts: 363
Joined: Mon Mar 14, 2016 9:22 am

Re: custom Texture for filling area

Postby 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 1346 times
peppemath
 
Posts: 12
Joined: Tue Mar 06, 2018 10:50 am


Return to LightningChart Ultimate How-To's

Who is online

Users browsing this forum: No registered users and 1 guest