Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] drawLine() does not work

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] drawLine() does not work


Chronological Thread 
  • From: Laurent Rineau <>
  • To:
  • Subject: Re: [cgal-discuss] drawLine() does not work
  • Date: Sun, 30 Dec 2007 18:32:07 +0100
  • Organization: Inria, Sophia Antipolis, FRANCE

On Sunday 30 December 2007 13:10:13 Mahmood NT wrote:
> I use a simple:
> widget->get_painter().drawLine (1,1,4,3);
>
> but there is no line in the window. What is the problem?

Maybe the points (1,1) and (4,3) are outside of the viewport. Check it with
widget->get_painter->viewport().

Why do you want to use widget->get_painter() directly? Maybe you should use
the native Qt drawing tools. If you want to use native drawings with
CGAL::Qt_widget IO operators, you may want to use the following functions:
int widget->x_pixel ( double x)
and int widget->y_pixel ( double y).

--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)



Archive powered by MHonArc 2.6.16.

Top of Page