Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Drag a drawn point

adrian116adrian116 Member Posts: 1
hello, i am building a code to draw a bezier curve.
before i start, i need some technique which will be necessary in my coding.
Bezier curve is dependent of control points. when i change the coordinate of a control point, the bezier will change correspondingly.
The main problem is, how can i edit the control point by drag it from the original coordinate to another coordinate? (An array will store the coordinate of control points).

thx
regards

Comments

  • james_zhengjames_zheng Member Posts: 1
    : hello, i am building a code to draw a bezier curve.
    : before i start, i need some technique which will be necessary in my
    : coding.
    : Bezier curve is dependent of control points. when i change the
    : coordinate of a control point, the bezier will change
    : correspondingly.
    : The main problem is, how can i edit the control point by drag it
    : from the original coordinate to another coordinate? (An array will
    : store the coordinate of control points).
    :
    : thx
    : regards
    :
    That sounds quite easy:
    1. erase the original control point using the background color when the mouse button is pressed down;
    2. draw the control point in the new coordinate when the mouse button is pressed up;

Sign In or Register to comment.