CompoundMixin

class ginga.canvas.CompoundMixin.CompoundMixin[source]

Bases: object

A CompoundMixin is a mixin class that makes an object that is an aggregation of other objects.

It is used to make generic compound drawing types as well as (for example) layers of canvases on top of an image.

Methods Summary

addObject(obj[, belowThis])

add_object(obj[, belowThis])

contains_pts(pts)

deleteAllObjects()

deleteObject(obj)

deleteObjects(objects)

delete_all_objects()

delete_object(obj)

delete_objects(objects)

draw(viewer)

getItemsAt(pt)

getObjects()

get_center_pt()

get_edit_points(viewer)

get_items_at(pt)

get_llur()

Get lower-left and upper-right coordinates of the bounding box of this compound object.

get_objects()

get_objects_by_kind(kind)

get_objects_by_kinds(kinds)

get_points()

get_reference_pt()

has_object(obj)

inherit_from(obj)

initialize(canvas, viewer, logger)

is_compound()

lowerObject(obj[, belowThis])

lower_object(obj[, belowThis])

move_delta_pt(off_pt)

raiseObject(obj[, aboveThis])

raise_object(obj[, aboveThis])

roll_objects(n)

rotate(theta[, xoff, yoff])

scale_by_factors(factors)

select_contains_pt(viewer, pt)

select_items_at(viewer, pt[, test])

setAttrAll(**kwdargs)

set_attr_all(**kwdargs)

swap_objects()

use_coordmap(mapobj)

Methods Documentation

addObject(obj, belowThis=None)
add_object(obj, belowThis=None)[source]
contains_pts(pts)[source]
deleteAllObjects()
deleteObject(obj)
deleteObjects(objects)
delete_all_objects()[source]
delete_object(obj)[source]
delete_objects(objects)[source]
draw(viewer)[source]
getItemsAt(pt)
getObjects()
get_center_pt()
get_edit_points(viewer)[source]
get_items_at(pt)[source]
get_llur()[source]

Get lower-left and upper-right coordinates of the bounding box of this compound object.

Returns
x1, y1, x2, y2: a 4-tuple of the lower-left and upper-right coords
get_objects()[source]
get_objects_by_kind(kind)[source]
get_objects_by_kinds(kinds)[source]
get_points()[source]
get_reference_pt()[source]
has_object(obj)[source]
inherit_from(obj)[source]
initialize(canvas, viewer, logger)[source]
is_compound()[source]
lowerObject(obj, belowThis=None)
lower_object(obj, belowThis=None)[source]
move_delta_pt(off_pt)[source]
raiseObject(obj, aboveThis=None)
raise_object(obj, aboveThis=None)[source]
roll_objects(n)[source]
rotate(theta, xoff=0, yoff=0)[source]
scale_by_factors(factors)[source]
select_contains_pt(viewer, pt)[source]
select_items_at(viewer, pt, test=None)[source]
setAttrAll(**kwdargs)
set_attr_all(**kwdargs)[source]
swap_objects()[source]
use_coordmap(mapobj)[source]