ilan Expert Licensed User Longtime User Jun 7, 2015 #1 hi i have an image and i would like to draw the image with canvas to my panel and i would like to draw the image but a specific color should be transparent like i have in my image a white frame and i would like to draw the image but the white frame should be drawn transparent and the image inside should be draw as is... is this possible? thanx in advance
hi i have an image and i would like to draw the image with canvas to my panel and i would like to draw the image but a specific color should be transparent like i have in my image a white frame and i would like to draw the image but the white frame should be drawn transparent and the image inside should be draw as is... is this possible? thanx in advance
NeoTechni Well-Known Member Licensed User Longtime User Jun 7, 2015 #2 I'd love to know that too. However, if you want to do it the other way you can just use a transparent PNG file. Run it through TinyPNG.com to keep the filesize down. Upvote 0
I'd love to know that too. However, if you want to do it the other way you can just use a transparent PNG file. Run it through TinyPNG.com to keep the filesize down.
ilan Expert Licensed User Longtime User Jun 8, 2015 #3 If i think about it again i think i know how it can be done. Just need to get evey pixel with bitmap.getpixel and if is white draw transparent else draw as is... will need to make some tests when i get home Upvote 0
If i think about it again i think i know how it can be done. Just need to get evey pixel with bitmap.getpixel and if is white draw transparent else draw as is... will need to make some tests when i get home
S sorex Expert Licensed User Longtime User Jun 8, 2015 #4 why don't you make the white area transparent in your source picture? Upvote 0
ilan Expert Licensed User Longtime User Jun 8, 2015 #5 Because my picture frame is not a square i want to make a puzzle game If the draw.path would have also radius and not only lines i would creat a path but you can only add line to the path Upvote 0
Because my picture frame is not a square i want to make a puzzle game If the draw.path would have also radius and not only lines i would creat a path but you can only add line to the path
klaus Expert Licensed User Longtime User Jun 8, 2015 #6 You could use the ABExtDrawing library, there you have following methods for paths: - addArc - arcTo - cubicTo - quadTo Upvote 0
You could use the ABExtDrawing library, there you have following methods for paths: - addArc - arcTo - cubicTo - quadTo