The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[Request] drawing a dinamic line
07-10-2014, 06:03 PM (This post was last modified: 07-10-2014 06:30 PM by fabila.)
Post: #1
[Request] drawing a dinamic line
I'm trying to draw a diameter of a circle, and rotate by dragging your finger on the screen,
How to do a single line it looks? I tried but that rect(G2) after blit(G2) but erases the background

Code:

export Mes()
BEGIN
    LOCAL m,m1,m2,mx,my,mxi,myi,A;
  RECT(RGB(252,252,200));
        DIMGROB_P(G2,340,240,RGB(252,252,200,128));
        DIMGROB_P(G3,340,240,RGB(252,252,200,128));
      ARC_P(G3,160,105,85,0,360);
blit(G3);
WHILE MOUSE(1)≥0 DO END;
REPEAT
    REPEAT
        m:=MOUSE;
        m1:=B→R(m(1));
        m2:=B→R(m(2));
        
    UNTIL SIZE(m1)>0;
    
        mx:=m1(1);
        my:=m1(2);
        mxi:=m1(3);
        myi:=m1(4);

    if m1(5)==#2d then  A:=(mx-mxi); END;
    
    LINE_P(G2,161+85*COS(A),106+85*SIN(A),161-85*COS(A),106-85*SIN(A),RGB(0,0,255));    
    TEXTOUT_P(A,G2,20,208,2,RGB(255,0,0));
  BLIT(G2);
UNTIL my>220 ;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[Request] drawing a dinamic line - fabila - 07-10-2014 06:03 PM



User(s) browsing this thread: 2 Guest(s)