[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]drwImage.DrawString1(txtText.Text,brush1.Value,x,y-[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]70[/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=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' draws final text with it's color[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]drwImage.DrawString1(txtText.Text,brush1.Value,x2,y2) [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' draws final text with it's color[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]x2=ScreenX0-ScreenX+x [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' calculates the image X2 coordinate[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]y2=ScreenY0-ScreenY+y [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' calculates the image Y2 coordinate[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
Here it is, it worked like I described it in the previous post.
Best regards.
Sub Globals
......
ImageFile = ""
Public Sub Show(ReturnToSub[COLOR=Red], file[/COLOR])
ReturnTo=ReturnToSub
[COLOR=Red]ImageFile=file[/COLOR]
If Initialized=0 Then
Init
Initialized=1
else
[COLOR=Red]bmpImage.New1(ImageFile)[/COLOR]
[COLOR=Red] UpdateImage[/COLOR]
End If
frmDraw.Show
End Sub
Sub Init
Sip(False) ' needed for optimized compiling
SetTransparentColor=ColTransp ' set transparent color
frmDraw.ForeLayer=True ' sets forelayre active
flbDraw.New1("frmDraw",B4PObject(1)) ' init formlib object
bmpImage.New1([COLOR=Red]ImageFile[/COLOR]) ' init image bitmap
drwImage.New2(bmpImage.Value) ' init drawer for the bitmap to draw onto it
drwForm.New1("frmDraw",False) ' init drawer for the form
Try this and tell me what you think. I use it for my own needs.
It's basically just a white screen that saves as a .gif image when closed and launches with it. Close with down button, erase with middle one.
EDIT:
You can save the coordinates of each point to an arraylist, save that arraylist and redraw your image the next time. I'm not sure about the speed however.
I sorry, I'll stop pestering you soon, I promise.
I now wish to pass the image to be displayed from the main program. I have had a bit of a fiddle and the code in RED below loads the new image but I'm doing it wrong because I cant draw on the new image.
Thanks againB4X:Sub Globals ...... ImageFile = "" Public Sub Show(ReturnToSub[COLOR=Red], file[/COLOR]) ReturnTo=ReturnToSub [COLOR=Red]ImageFile=file[/COLOR] If Initialized=0 Then Init Initialized=1 else [COLOR=Red]bmpImage.New1(ImageFile)[/COLOR] [COLOR=Red] UpdateImage[/COLOR] End If frmDraw.Show End Sub Sub Init Sip(False) ' needed for optimized compiling SetTransparentColor=ColTransp ' set transparent color frmDraw.ForeLayer=True ' sets forelayre active flbDraw.New1("frmDraw",B4PObject(1)) ' init formlib object bmpImage.New1([COLOR=Red]ImageFile[/COLOR]) ' init image bitmap drwImage.New2(bmpImage.Value) ' init drawer for the bitmap to draw onto it drwForm.New1("frmDraw",False) ' init drawer for the form
...
img.ScreenCapture2(0,23,240,273)
img.SaveImageJPEG(img.image, AppPath & name)
...
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?