[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    Canvas(3X) manual page Table of Contents

Name

Canvas - area of the display used by an interactor for graphics output

Synopsis

#include <ivplus/canvas.h>

Description

Canvas is an area for graphics output associated with an interactor. Most interactors do not need to perform any operations on a canvas; they simply pass a canvas as an argument to graphics operations. In this case, it is not necessary to include the canvas.h file.

Class Hierarchy

Canvas

Constructors

Canvas()

Creates a canvas.

Public Data

typedef unsigned int CanvasLocation;

enum { mapped, unmapped, offscreen };

These are used together as return values for the status() operation.

Public Operations

unsigned int Height () const

Returns the height in pixels of the canvas.

virtual void psize(unsigned int width, unsigned int height)

Sets the size of the canvas to int width and int height pixel values.

CanvasRep* rep()

Returns a pointer to the CanvasRep for the canvas. The CanvasRep class is a low level interface to X Windows. It is not expected that developers will need details of the CanvasRep interface so the CanvasRep class is not documented.

virtual void SetBackground(const Color* color)

Sets the background color of the canvas to color.

virtual CanvasLocation status() const

Returns whether the canvas is currently mapped, unmapped, or off screen.

unsigned int Width () const

Returns the width of the canvas in pixels.

Window* window() const

Returns a pointer to the window associated with the canvas.

Protected Operations

None.

X Resources

None.

Examples

No example for this class. See Color(3X) , Shape(3X) , Pattern(3X) , and Painter(3X) for examples.

Files


canvas.h

See Also

Interactor(3X) , Painter(3X) , Window(3X) .


Table of Contents