|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.lib.min_interactor | +--sub_arctic.lib.base_interactor | +--sub_arctic.lib.base_parent_interactor | +--sub_arctic.lib.shadow_caster
This class provides a container that draws its child subtrees with a shadow under them. This is done by drawing the children twice, once with a shadow_drawable object (which turns all colors gray and offsets the drawing slightly), then again on top normally. Shadow_graphics objects have two drawing settings, expensive but accurate, and fast but inaccurate (in particular drawing all images as filled rectangles). This setting can also be made here and defaults to fast.
shadow_drawable
Field Summary | |
protected boolean |
_expensive_draw
Do we do expensive but realistic drawing of shadows for images, or do we just do their bounding rectangle? Default is to be cheap about it. |
protected int |
_x_offset
X offset for shadow |
protected int |
_y_offset
Y offset for shadow |
Fields inherited from class sub_arctic.lib.base_interactor |
_child_index,
_child_list,
_clip_bounds,
_constraint_flags,
_enabled_constraint,
_flags,
_h,
_h_constraint,
_parent,
_part_a_constraint,
_part_b_constraint,
_user_data,
_visible_constraint,
_w,
_w_constraint,
_x,
_x_constraint,
_y,
_y_constraint,
default_child_hint |
Constructor Summary | |
shadow_caster(int xv,
int yv,
int wv,
int hv)
Constructor with default shadow offsets. |
|
shadow_caster(int xv,
int yv,
int wv,
int hv,
int shad_x,
int shad_y)
Full constructor. |
Method Summary | |
void |
damage_from_child(interactor originator,
java.lang.Object user_info,
java.awt.Point top_left,
java.awt.Dimension sz)
Catch damage from our children and make it bigger to account for the shadow. |
protected void |
draw_self_local(drawable d)
Draw self. |
boolean |
expensive_draw()
Are currently doing expensive but realistic drawing shadows for images, or do are we just drawing their bounding rectangle? |
void |
set_expensive_draw(boolean v)
Set whether we draw image shadows realistically, but expensively (slow), or just draw their bounding rectangles (fast). |
void |
set_offset(int xoff,
int yoff)
Set offset for shadow. |
void |
set_x_offset(int xoff)
Set x offset for shadow. |
void |
set_y_offset(int yoff)
Set y offset for shadow. |
int |
x_offset()
X offset for shadow. |
int |
y_offset()
Y offset for shadow. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean _expensive_draw
protected int _x_offset
protected int _y_offset
Constructor Detail |
public shadow_caster(int xv, int yv, int wv, int hv, int shad_x, int shad_y)
int
- xv the x position of the interactor.int
- yv the y position of the interactor.int
- wv the width of the interactor.int
- hv the height of the interactor.int
- shad_x the x offset of the shadow.int
- shad_y the y offset of the shadow.public shadow_caster(int xv, int yv, int wv, int hv)
int
- xv the x position of the interactor.int
- yv the y position of the interactor.int
- wv the width of the interactor.int
- hv the height of the interactor.Method Detail |
public boolean expensive_draw()
public void set_expensive_draw(boolean v)
boolean
- v the new setting (true for expensive).public int x_offset()
public void set_x_offset(int xoff)
int
- xoff new x offset.public int y_offset()
public void set_y_offset(int yoff)
int
- yoff new y offset.public void set_offset(int xoff, int yoff)
int
- xoff new x offset.int
- yoff new y offset.protected void draw_self_local(drawable d)
drawable
- d the surface we draw on.public void damage_from_child(interactor originator, java.lang.Object user_info, java.awt.Point top_left, java.awt.Dimension sz)
interactor
- originator the interactor that caused the damage.Object
- user_info uninterpreted information supplied by
the originator at damage time.Point
- top_left top-left corner of child's damage area
(in our coordinate system).Dimension
- sz size of the damage area.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |