There is nothing wrong with that, I'm already using it.What's wrong with
Rect1.New1(x-radius, y-radius, radius*2, radius*2)
DrawEllipse(Pen1.Value, Rect1.Value)
[SIZE=2][FONT=Courier New][SIZE=2][FONT=Courier New]bmpImage.New1([/FONT][/SIZE][/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]AppPath[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]&[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"\Rose.gif"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]drwImage.New2(bmpImage.Value)[/FONT][/SIZE]
[/SIZE][/FONT]
Neither, it's a GDI+ limitation. You can't draw on a Bitmap derived from an image that uses a colour palette.[/SIZE][/FONTIs this a bug or a DrawerEx limitation ?
It's probably a bug in Basic4ppc, post #16 onwards of this thread has the details http://www.b4x.com/forum/questions-help-needed/3655-image-zoom-memory-problem-2.html Erel should fix this in the next release. You can minimise the problem by Bitmap.Dispose then AddObject as in the code fragment in post#16 of the thread. You will still lose a small amount of memory for each time you New the same Bitmap object until the bug is fixed but it probably won't be noticable.i'm find outflow of memory when using DrawImage method!
Sub App_Start
formex.New1("main.form1")
'form1.Show
[COLOR=Red]formex.Color=Rgb(200,200,200)
formex.TransparencyKey=Rgb(255,0,255)[/COLOR]
formex.Run
End Sub
Sub Button1_Click
bitmapex.New1(AppPath&"\smallimage2.bmp")
bitmapex2.New2(formex.Width,formex.Height)
'bitmapex2.New2(form1.Width,form1.Height)
drawerex.New2(bitmapex2.Value)
rect1.New1(0,0,bitmapex.Width,bitmapex.Height)
rect2.New1(0,0,bitmapex.Width,bitmapex.Height)
If checkbox1.Checked Then
drawerex.SetTransparentColor(Rgb(255,0,255))
drawerex.DrawImage(bitmapex.Value,rect1.Value,rect2.Value,True)
Else
drawerex.DrawImage(bitmapex.Value,rect1.Value,rect2.Value,False)
End If
formex.Image=bitmapex2.Value
'form1.Image=bitmapex2.Value
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?