Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, April 2008
drwing an arc


Message 1 in thread

Hello,
Is it possible to draw an arc of circle with three points: 
start_point(xs,ys)
end_point(xe,ye)
center_circle(xc,yc)
If yes how can I do that? If not what should I do again? :)
-----------------
Mahmood Naderan


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Message 2 in thread

Mahmood Naderan wrote:
> Hello,
> Is it possible to draw an arc of circle with three points:
> start_point(xs,ys)
> end_point(xe,ye)
> center_circle(xc,yc)
>  
> If yes how can I do that? If not what should I do again? :)
Look at the QPainter::drawArc() functions.
>  
> -----------------
> Mahmood Naderan
> 
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>  >

--
 [ signature omitted ] 

Message 3 in thread

> Look at the QPainter::drawArc() functions.
according to manual:
void QPainter::drawArc ( int x, int y, int w, int h, int a, int alen )
Draws an arc defined by the rectangle (x,y,w,h), the start angle a and the arclength alen.
then it says:
The angles a and alen are 1/16th of a degree
So my question: is "alen" the arc length? or it is the degree of arc (from start to end)? 
If it is "int" then 1/16th would be zero!??
---------------
Mahmood Naderan
 


----- Original Message ----
From: John McClurkin <jwm@xxxxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 22, 2008 3:44:49 PM
Subject: Re: drwing an arc

Mahmood Naderan wrote:
> Hello,
> Is it possible to draw an arc of circle with three points:
> start_point(xs,ys)
> end_point(xe,ye)
> center_circle(xc,yc)
>  
> If yes how can I do that? If not what should I do again? :)
Look at the QPainter::drawArc() functions.
>  
> -----------------
> Mahmood Naderan
> 
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>  >

--
 [ signature omitted ] 
Message 4 in thread

Hi,

> according to manual:
> void QPainter::drawArc ( int x, int y, int w, int h, int a, *int alen* )

Which version of the Qt documentation are you looking at?

The current documentation reads:
[...]
The startAngle and spanAngle must be specified in 1/16th of a degree, 
i.e. a full circle equals 5760 (16 * 360). Positive values for the 
angles mean counter-clockwise while negative values mean the clockwise 
direction. Zero degrees is at the 3 o'clock position.
[...]
void QPainter::drawArc(int x, int y, int width, int height, int 
startAngle, int spanAngle)

-- 
 [ signature omitted ]