Code: Select all
If OpenWindow(0, 0, 0, 200, 200, "2DDrawing Example DPI", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateImage(0, 200, 200, 24, $FFFFFF) And StartDrawing(ImageOutput(0))
; Draw the same figure at different locations by moving the drawing origin
For x = 0 To 120 Step 40
For y = 0 To 120 Step 60
SetOrigin(x, y)
color = Point(x, y)
Debug color
Box(0, 0, 30, 30, $FF0000)
Circle(15, 15, 10, $00FF00)
Circle(15, 15, 5, color)
Next y
Next x
StopDrawing()
ImageGadget(0, 0, 0, 200, 200, ImageID(0))
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
