2D decorations for the OpenGL canvas.
A decoration is a 2-D drawing at canvas position x,y.
x,y : (int) window coordinates of the insertion point drawGL() : function that draws the decoration at (x,y).
This should only use openGL function that are allowed in a display list.
Methods
Create a decoration at canvas coordinates x,y
Methods
Decoration objects have the following methods:
A mark at a fixed position on the canvas.
Methods
Mark objects have the following methods:
A straight line on the canvas.
Methods
Line objects have the following methods:
A viewport decoration showing a text string.
- text: a simple string, a multiline string or a list of strings. If it is a string, it will be splitted on the occurrence of ‘
Methods
Create a text actor
Methods
GlutText objects have the following methods:
A viewport decoration showing a colorscale legend.
Methods
ColorLegend objects have the following methods:
A 2D-rectangle on the canvas.
Methods
Rectangle objects have the following methods:
A 2D-grid on the canvas.
Methods
Grid objects have the following methods:
A collection of straight lines on the canvas.
Methods
Initially a Line Drawing.
data can be a 2-plex Formex or equivalent coordinate data. The z-coordinates of the Formex are unused. A (n,2,2) shaped array will do as well.
Methods
LineDrawing objects have the following methods:
An OpenGL actor representing a triade of global axes.
horizontal position (‘l’, ‘c’ or ‘r’) and second sets vertical position (‘b’, ‘c’ or ‘t’).
size: size in pixels of the zone displaying the triade.
pat: shape to be drawn in the coordinate planes. Default is a square. ‘16’ givec a triangle. ‘’ disables the planes.
legend: text symbols to plot at the end of the axes. A 3-character string or a tuple of 3 strings.
Methods
Triade objects have the following methods:
Functions defined in the module decors
- decors.drawDot(x, y)¶
- Draw a dot at canvas coordinates (x,y).
- decors.drawLine(x1, y1, x2, y2)¶
- Draw a straight line from (x1,y1) to (x2,y2) in canvas coordinates.
- decors.drawGrid(x1, y1, x2, y2, nx, ny)¶
Draw a rectangular grid of lines
The rectangle has (x1,y1) and and (x2,y2) as opposite corners. There are (nx,ny) subdivisions along the (x,y)-axis. So the grid has (nx+1) * (ny+1) lines. nx=ny=1 draws a rectangle. nx=0 draws 1 vertical line (at x1). nx=-1 draws no vertical lines. ny=0 draws 1 horizontal line (at y1). ny=-1 draws no horizontal lines.
- decors.drawRect(x1, y1, x2, y2)¶
- decors.drawRectangle(x1, y1, x2, y2, color)¶