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

add_object(obj[, belowThis])

contains_pts(pts)

copy([share])

delete_all_objects()

delete_object(obj)

delete_objects(objects)

draw(viewer)

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()

lower_object(obj[, belowThis])

move_delta_pt(off_pt)

raise_object(obj[, aboveThis])

roll_objects(n)

rotate_deg(thetas, offset)

scale_by_factors(factors)

select_contains_pt(viewer, pt)

select_items_at(viewer, pt[, test])

set_attr_all(**kwdargs)

set_edit_point(i, pt, detail)

setup_edit(detail)

swap_objects()

use_coordmap(mapobj)

Methods Documentation

add_object(obj, belowThis=None)[source]
contains_pts(pts)[source]
copy(share=[])[source]
delete_all_objects()[source]
delete_object(obj)[source]
delete_objects(objects)[source]
draw(viewer)[source]
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]
lower_object(obj, belowThis=None)[source]
move_delta_pt(off_pt)[source]
raise_object(obj, aboveThis=None)[source]
roll_objects(n)[source]
rotate_deg(thetas, offset)[source]
scale_by_factors(factors)[source]
select_contains_pt(viewer, pt)[source]
select_items_at(viewer, pt, test=None)[source]
set_attr_all(**kwdargs)[source]
set_edit_point(i, pt, detail)[source]
setup_edit(detail)[source]
swap_objects()[source]
use_coordmap(mapobj)[source]