Algorithmic Solutions > LEDA > LEDA Guide > Windows and Panels > Drawing Operations

Drawing Operations

The output operators << apply to the basic objects of the floating point kernel. The window class also provides a large number of additional drawing operations that give more flexibility.
A list of available operations for drawing points, segments, rays, arcs and curves, arrows, circles, discs, polygons ... and the details for using them can be found on the Manual Page Windows.

On the right you see a screenshot of a window with points and circles. The screenshot is taken from the example of drawing operations.

Example of Convex Hull

Example of drawing operations

Usage of Drawing Operations

There are two kinds of drawing operations available for geometric objects
	void W.draw_object(coords, color col=window::fg_color);
	void W.draw_object(object, color col=window::fg_color);
For the first variant a geometric object is given by its coordinates in the user coordinate system, and for the second variant, the object is given as an object of the floating point kernel.

Remark: The window data type can draw many more types of objects than are available in the geometry kernels.

Clearing the Drawing Section

The clear() operation erases the window by painting it with the background color or tiling it using the background pixrect (if defined).
	void W.clear();
	void W.clear(double x0, double y0, double x1, double y1);
The second variant only clears the rectangle (x0,y0,x1,y1).

See also:

Input and Output Operators

Windows and Panels

Pixel and User Coordinate Systems

Window Parameters

Pixrects (Pixmaps)


Basic Data Types for 2D Geometry

Manual Pages:

Manual Page Windows

Please send any suggestions, comments or questions to
© Copyright 2001-2003, Algorithmic Solutions Software GmbH