CANVAS(3)

PACKAGE
canvas - Routines to manipulate world canvases

PURPOSE
These routines are meant to provide a high level mechanism to create and manipulate world canvases (canvases which have a co-ordinate system based on real-world co-ordinates). These canvases utilise the pixel canvases available in the <-kwin-> package, hence the resulting code is device independent.

LIBRARY
karmagraphics

LINK WITH
-lkarmagraphics

FUNCTIONS

canvas_draw_edit_list
    Draw a list of edit objects to a world canvas.

canvas_draw_edit_object
    Draw one edit object to a world canvas.

canvas_create
    Create world canvas.

canvas_destroy
    Destroy a world canvas.

canvas_register_precompute_func
    Register a refresh precompute callback.

canvas_register_refresh_func
    Register world canvas refresh callback.

canvas_register_size_control_func
    Register size control callback.

canvas_register_legend_reservation_func
    Register legend space reservation callback.

canvas_register_position_event_func
    Register position event callback.

canvas_register_destroy_func
    Register destroy callback.

canvas_get_attributes
    Get canvas attributes.

canvas_set_attributes
    Set canvas attributes.

canvas_resize
    Resize a world canvas.

canvas_refresh_if_visible
    Refresh a world canvas if it is visible.

canvas_specify
    Set specification information for a world canvas.

canvas_get_specification
    Get specification information for a world canvas.

canvas_convert_to_canvas_coords
    Convert pixel co-ordinates to world co-ordinates.

canvas_convert_from_canvas_coords
    Convert world co-ordinates to pixel co-ordinates.

canvas_register_coords_convert_func
    Register co-ordinate conversion function.

canvas_coords_transform
    Transform world co-ordinates.

canvas_register_transforms_func
    Register non-linear co-ordinate transformation function.

canvas_register_transforms_free_func
    Register non-linear co-ordinate transformation free function.

canvas_get_pixcanvas
    Get the underlying pixel canvas of a world canvas.

canvas_get_colour
    Get (possibly allocating) a colourcell for a canvas.

canvas_set_dressing
    Set dressing parameters for a world canvas.

canvas_get_dressing
    Get dressing parameters for a world canvas.

canvas_sequence_dressing_refresh
    Set order in which dressing is refreshed.

canvas_draw_dressing
    Draw the dressing (axes, etc.) for a world canvas.

canvas_get_cmap
    Get the Kcolourmap object associated with a world canvas.

canvas_warp_pointer
    Warp the pointer to a new location.

canvas_test_for_boundary
    Test if co-ordinates lie within the canvas boundary.

canvas_draw_image
    Draw a PseudoColour image onto a world canvas.

canvas_draw_rgb_image
    Draw a TrueColour image onto a world canvas.

canvas_draw_point
    Draw a single point onto a world canvas.

canvas_draw_point_p
    Draw a single point onto a world canvas.

canvas_draw_line
    Draw a single line onto a world canvas.

canvas_draw_line_p
    Draw a single line onto a world canvas.

canvas_draw_arc
    Draw an arc onto a world canvas.

canvas_draw_arc_p
    Draw an ellipse onto a world canvas.

canvas_draw_ellipse
    Draw an ellipse onto a world canvas.

canvas_draw_ellipse_p
    Draw an ellipse onto a world canvas.

canvas_fill_ellipse
    Draw a filled ellipse onto a world canvas.

canvas_fill_ellipse_p
    Draw a filled ellipse onto a world canvas.

canvas_convert_ellipse_coords
    Convert co-ordinates for an ellipse.

canvas_fill_polygon
    Draw a filled polygon onto a world canvas.

canvas_draw_rectangle
    Draw a single rectangle onto a world canvas.

canvas_draw_rectangle_p
    Draw a single rectangle onto a world canvas.

canvas_fill_rectangle
    Fill a single rectangle onto a world canvas.

canvas_fill_rectangle_p
    Fill a single rectangle onto a world canvas.

canvas_draw_lines
    Draw multiple connected lines onto a world canvas.

canvas_draw_lines_p
    Draw multiple connected lines onto a world canvas.

canvas_draw_segments
    Draw multiple disjoint lines onto a world canvas.

canvas_draw_segments_p
    Draw multiple disjoint lines onto a world canvas.

canvas_get_margins
    Get margin space for a canvas.

canvas_associate_object
    Associate an object with a world canvas.

canvas_get_associated_object
    Get an associated object for a world canvas.

canvas_init_win_scale
    Initialise win_scale structure.

canvas_use_log_scale
    Enable logarithmic scaling for a world canvas.

canvas_use_astro_transform
    Use astronomical sky projections for a canvas.

canvas_track_compute
    Compute track strings.

canvas_draw_circle_marker
    Draw a circle marker.

canvas_draw_line_marker
    Draw a line marker.

canvas_create_stroke_instruction
    Create an image editing stroke instruction.

canvas_zoom_handle_keys
    Install callbacks to handle zoom key bindings for a world canvas.

canvas_zoom_handle_mouse
    Install callbacks to handle left mouse zooming for world canvas.

canvas_PROTO_precompute_func
    Precompute event callback.

canvas_PROTO_refresh_func
    Refresh event callback.

canvas_PROTO_size_control_func
    Size control callback.

canvas_PROTO_position_func
    Position event callback.

canvas_PROTO_destroy_func
    Process a destroy event on a world canvas.

canvas_PROTO_coord_convert_func
    Co-ordinate conversion callback.

canvas_PROTO_coord_transform_func
    Co-ordinate transformation callback.

canvas_PROTO_legend_reservation_func
    Legend space reservation callback.

TABLE canvas_ATTRIBUTES
List of attributes for KWorldCanvas objects
Name Get Type Set Type Meaning
CANVAS_ATT_END End of varargs list
CANVAS_ATT_X_OFFSET int * int X offset (pixels)
CANVAS_ATT_Y_OFFSET int * int Y offset (pixels)
CANVAS_ATT_X_PIXELS int * int X size (pixels)
CANVAS_ATT_Y_PIXELS int * int Y size (pixels)
CANVAS_ATT_BLANK_PIXEL unsigned long *unsigned long Blank pixel
CANVAS_ATT_MIN_SAT_PIXEL unsigned long *unsigned long Min saturation pixel
CANVAS_ATT_MAX_SAT_PIXEL unsigned long *unsigned long Max saturation pixel
CANVAS_ATT_LEFT_X double * double Left X (linear)
CANVAS_ATT_RIGHT_X double * double Right X (linear)
CANVAS_ATT_BOTTOM_Y double * double Bottom Y (linear)
CANVAS_ATT_TOP_Y double * double Top Y (linear)
CANVAS_ATT_VALUE_MIN double * double Minimum value
CANVAS_ATT_VALUE_MAX double * double Maximum value
CANVAS_ATT_ISCALE_FUNC flag (*) () Intensity scale function
CANVAS_ATT_ISCALE_FREE_FUNC void (*) () Free function
CANVAS_ATT_ISCALE_INFO void ** void iscale info
CANVAS_ATT_AUTO_MIN_SAT flag * flag Auto min-sat
CANVAS_ATT_AUTO_MAX_SAT flag * flag Auto max-sat

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/