Hi everybody!
For my father i created a simple image viewer, because my father hate to have 25 Buttons on a window. This was quiet simple to build. But now he ask me for drawing text on an image. Good, just use DrawText, i thought, but how can i get this text movable and editable after drawing??? And, with saving this modified image, keep it movable and editable???
I am grateful for each Note!
movable text on an image?
movable text on an image?
I am German - that's hard enough 
DataMiner,
Here's a super-basic ugly example for you.
Here's a super-basic ugly example for you.
Code: Select all
EnableExplicit
UsePNGImageDecoder()
LoadImage(0, "c:\temp\bliss.png")
CopyImage(0, 1)
If OpenWindow(0, 0, 0, ImageWidth(0) + 15, ImageHeight(0) + 15, "Test", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_TitleBar)
;
If CreateGadgetList(WindowID(0))
ImageGadget(0, 0, 0, ImageWidth(0), ImageHeight(0), ImageID(0), #PB_Image_Border)
EndIf
;
EndIf
Define.l EventID
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Break
ElseIf EventID = #WM_MOUSEMOVE
FreeImage(0) : CopyImage(1, 0)
StartDrawing(ImageOutput(0))
DrawText(WindowMouseX(0), WindowMouseY(0), "Hello!")
StopDrawing()
SetGadgetState(0, ImageID(0))
ElseIf EventID = #PB_Event_Gadget
EndIf
ForEver
