Im with drawing again, now drawig a beizer curve (if you don't know what it is run the code and you will recognize it).
Code: Select all
Structure PointAPI
x.l
y.l
EndStructure
Dim P.PointAPI(3)
Procedure CreateBezier()
StartDrawing(WindowOutput())
Red = RGB(255,0,0)
Blue = RGB(0,0,255)
P(0)\x = 0
P(0)\y = 0
P(1)\x = 80
P(1)\y = 10
P(2)\x = 150
P(2)\y = 70
P(3)\x = 130
P(3)\y = 230
LineXY(P(0)\x+10,P(0)\y+10,P(1)\x+10,P(1)\y+10,Blue)
Box(P(0)\x+10,P(0)\y+10, 4, 4,Red)
Box(P(1)\x+10,P(1)\y+10, 4, 4,Red)
LineXY(P(2)\x+10,P(2)\y+10,P(3)\x+10,P(3)\y+10,Blue)
Box(P(2)\x+10,P(2)\y+10, 4, 4,Red)
Box(P(3)\x+10,P(3)\y+10, 4, 4,Red)
hDC = GetDC_(GadgetID(1))
PolyBezier_(hDC,@P(),4)
StopDrawing()
EndProcedure
If OpenWindow(0,100,150,450,300,#PB_Window_SystemMenu,"Create Beizer Curve")
CreateGadgetList(WindowID())
ImageGadget(1,10,10,255,255,LoadImage(0,""))
ButtonGadget(3,300,140,50,25,"Curve")
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_EventGadget
Select EventGadgetID()
Case 3
CreateBezier()
EndSelect
EndSelect
Until EventID=#PB_EventCloseWindow
EndIf
1.- I want to make it interactive, to let the user drag any of the 4 point to manipulate the curve ¿any idea of the best way to achieve it?
I need no flickering but need to save the result as BMP.
2.- I want to know all (or many) the points of the curve...

Thanks in advance if any BIG & charitative soul help me i will be greatefull forever
