M me68 Member Licensed User Longtime User Aug 9, 2013 #1 Hello! I embeded the sample ABMeter as class-modul to our app. I'll use it as amperemeter for a cockpit-view of an electric-car (Citroen C-Zero/Peugeot iOn/Mitsubishi i-MiEV). It outperforms my expections - it's working great! But i'm, not familiar with all this painting-functions. I'll want to use only the needle on a transparent background. But if i remove the background-painting (in my case adapted drawLogo), i get a lot of needles. Code: Copy Sub drawMe(Canv As Canvas) ExDraw.save2(Canv, ExDraw.MATRIX_SAVE_FLAG) ExDraw.scale(Canv, scale, scale) 'drawLogo(Canv) drawHand(Canv) ExDraw.restore(Canv) If handNeedsToMove Then MoveHand End If GetPanel("Pnl_CockpitAmperemeter").Invalidate End Sub If i use adapted drawLogo, it looks like following (the orginal needle must be removed from the image, which is used as background): But this is only a workaround. The "logo" does not fit 100% and on this the speed-value is not visible. How can i use only the needle on a transparent background? Martin
Hello! I embeded the sample ABMeter as class-modul to our app. I'll use it as amperemeter for a cockpit-view of an electric-car (Citroen C-Zero/Peugeot iOn/Mitsubishi i-MiEV). It outperforms my expections - it's working great! But i'm, not familiar with all this painting-functions. I'll want to use only the needle on a transparent background. But if i remove the background-painting (in my case adapted drawLogo), i get a lot of needles. Code: Copy Sub drawMe(Canv As Canvas) ExDraw.save2(Canv, ExDraw.MATRIX_SAVE_FLAG) ExDraw.scale(Canv, scale, scale) 'drawLogo(Canv) drawHand(Canv) ExDraw.restore(Canv) If handNeedsToMove Then MoveHand End If GetPanel("Pnl_CockpitAmperemeter").Invalidate End Sub If i use adapted drawLogo, it looks like following (the orginal needle must be removed from the image, which is used as background): But this is only a workaround. The "logo" does not fit 100% and on this the speed-value is not visible. How can i use only the needle on a transparent background? Martin
M me68 Member Licensed User Longtime User Aug 12, 2013 #2 Solution: I clipped the region of the area, which is used by the needle now. The rest of the image is transparent. So i can use the drawLogo with this special prepared image now: Martin Last edited: Aug 12, 2013 Upvote 0
Solution: I clipped the region of the area, which is used by the needle now. The rest of the image is transparent. So i can use the drawLogo with this special prepared image now: Martin