|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes objects which serve as interactor image blanks. A blank is a background image designed to have parts filled in within or over it to complete the appearance of an interactor. Each blank provides either * an image, or code to produce one, along with a bounding box for its interior drawing area (also known as its interior size). For example, a button blank provides the appearance of a button without a textual label and provides an interior drawing area which is the bounding box that the label is to fit within.
Each blank also serves as a prototype for instantiating new blanks of the same time, but with a potentially different size. Sizes for new blanks can be given as exterior or interior size. Interior size indicates the resultant available drawing area for the blank. All not-negative values for interior size are acceptable. However, there may be a minimum exterior size for some blanks. If an exterior size smaller than the minimum is requested, a minimum sized blank will be returned instead.
Field Summary | |
static int |
EXTERIOR_SIZED
Constant to indicate we want to build based on exterior size. |
static int |
INTERIOR_SIZED
Constant to indicate we want to build based on interior size. |
Method Summary | |
blank |
build(int size_kind,
int req_w,
int req_h)
Build a new blank like this one, but with a different size. |
blank |
build(int w_size_kind,
int req_w,
int h_size_kind,
int req_h)
Build a new blank like this one, but with a different size. |
int |
draw_area_h()
Height of interior drawing area. |
int |
draw_area_w()
Width of interior drawing area. |
int |
draw_area_x_off()
Offset from left edge of bounding box to the left edge of the interior drawing area. |
int |
draw_area_y_off()
Offset from top edge of bounding box to the top edge of the interior drawing area. |
void |
draw_self(drawable on_surface,
int at_x,
int at_y)
Draw the image of the blank on the given drawing surface with the top left corner of its bounding box at the given location. |
void |
set_draw_area_h(int val)
Set the height of interior drawing area. |
void |
set_draw_area_w(int val)
Set the width of interior drawing area. |
Methods inherited from interface sub_arctic.style.composition_part |
can_set_h,
can_set_w,
feature_point,
h,
num_feature_points,
set_h,
set_w,
set_x,
set_y,
w,
x,
y |
Field Detail |
public static final int EXTERIOR_SIZED
public static final int INTERIOR_SIZED
Method Detail |
public int draw_area_x_off()
public int draw_area_y_off()
public int draw_area_w()
public void set_draw_area_w(int val)
int
- val the new width of the interior drawing area.public int draw_area_h()
public void set_draw_area_h(int val)
int
- val the new height of the interior drawing area.public void draw_self(drawable on_surface, int at_x, int at_y)
drawable
- on_surface the drawing surface to draw on.int
- at_x the x location to place the image at.int
- at_y the y location to place the image at.public blank build(int size_kind, int req_w, int req_h)
int
- size_kind either EXTERIOR_SIZED or INTERIOR_SIZED to indicate
whether the given size request is for the whole image
or the interior drawing area within the blank.
EXTERIOR_SIZED requests below a minimum size may
result in creation of a blank at the (larger) minimum
size instead of the requested size.int
- req_w requested width.int
- req_h requested height.public blank build(int w_size_kind, int req_w, int h_size_kind, int req_h)
int
- w_size_kind either EXTERIOR_SIZED or INTERIOR_SIZED to indicate
whether the given size request is for the external
width of the whole blank or the interior drawing
width within the blank. EXTERIOR_SIZED requests
below a minimum size may result in creation of a
blank at the (larger) minimum size instead of the
requested size.int
- req_w requested width.int
- h_size_kind either EXTERIOR_SIZED or INTERIOR_SIZED to indicate
whether the given size request is for the external
width of the whole blank or the interior drawing
width within the blank. EXTERIOR_SIZED requests
below a minimum size may result in creation of a
blank at the (larger) minimum size instead of the
requested size.int
- req_h requested height.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |