change drawtext size in GeUserArea [SOLVED]
-
On 05/05/2015 at 19:09, xxxxxxxx wrote:
no one knows if this is a bug or not? the Bitmap should be empty, but for unknown reason it fills the Bitmap with the last pen color, any idea how to solve this?
-
On 05/05/2015 at 22:20, xxxxxxxx wrote:
Hi Mohamed,
I'm currently at FMX. I'll be looking into this after my return next Monday.
-
On 05/05/2015 at 23:49, xxxxxxxx wrote:
I've also experienced this. DrawBitmap() seems to use the last pen
color instead of mixing alpha pixels with the pixels that are already on
the GeUserArea. -
On 06/05/2015 at 06:48, xxxxxxxx wrote:
No need for the explicit additional bitmap and alpha channel allocation.
You can set the transparency value with SetColor(r,g,b,a).i.e. cm->SetColor(r,g,b,128) will give a half transparent output.
hth
-
On 06/05/2015 at 13:46, xxxxxxxx wrote:
yea Samir, but it remains with an unavoidable bug!! , background is not transparent.
-
On 07/05/2015 at 03:34, xxxxxxxx wrote:
I can't confirm. It works. Here is the code:
OffScreenOn(); Int32 w = 100; Int32 h = 100; AutoAlloc<GeClipMap> bmp; bmp->Init(w,h,32); bmp->BeginDraw(); bmp->SetDrawMode(GE_CM_DRAWMODE_COPY,255); bmp->SetColor(255,255,255,0); //Fully transparent bmp->FillRect(0,0,w,h); //Set the whole bitmap transparent bmp->SetDrawMode(GE_CM_DRAWMODE_COPY,255); bmp->SetColor(255,255,255,128); //50% transparent bmp->TextAt(10,10,"Katachi rocks.. :-D"); //Draw text bmp->EndDraw(); DrawBitmap(bmp->GetBitmap(),0,0,w,h,0,0,w,h,BMP_ALLOWALPHA);
-
On 07/05/2015 at 06:43, xxxxxxxx wrote:
Hi Samir,
try to add DrawSetPen(Vector(0.8, 0.2, 0.2)); "or any other color" after OffScreenOn(); and you will find the bug, I tested your code and the same problem appears.
-
On 07/05/2015 at 10:23, xxxxxxxx wrote:
Then don't. Why are you using DrawSetPen?
-
On 07/05/2015 at 14:23, xxxxxxxx wrote:
drawing other stuff prior to texts, should I draw everything in one clipmap? not sure about performance, I will test, it may worth a shot!!
-
On 08/05/2015 at 01:19, xxxxxxxx wrote:
yes, if you don't have a good reason, you should stay with the clip map drawing functions.
-
On 16/05/2015 at 21:26, xxxxxxxx wrote:
after using GeClipMap in all drawings it worked perfectly , thanks all for the help, you can mark this as solved