sub_arctic.style
Class transparent_blank
java.lang.Object
|
+--sub_arctic.style.composition_part_base
|
+--sub_arctic.style.blank_base
|
+--sub_arctic.style.hv_fill_blank
|
+--sub_arctic.style.transparent_blank
- public class transparent_blank
- extends hv_fill_blank
This class implements an expandable transparent blank. This is used
in cases where we need a blank for sizing, but don't want to actually
draw anything. This blank has a zero border.
Two constructors are provided: one based on a requested exterior size, and
one based on a requested interior size (the resulting interior drawing area).
Since we have zero border however, you get the same result in either case.
Constructor Summary |
transparent_blank(int size_kind,
int req_w,
int req_h)
Construct a blank based on either an exterior or an interior size
request (as indicated by size_kind being either EXTERIOR_SIZED, or
INTERIOR_SIZED respectively, which we promptly ignore since they are
the same for us). |
transparent_blank(int w_kind,
int req_w,
int h_kind,
int req_h)
Construct a blank based on either an exterior or an interior size
requests (as indicated by size_kind being either EXTERIOR_SIZED, or
INTERIOR_SIZED respectively, which we promptly ignore since they are
the same for us). |
Method Summary |
blank |
build(int w_kind,
int req_w,
int h_kind,
int req_h)
Create a new blank of a given size using this one as a prototype. |
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. |
Methods inherited from class sub_arctic.style.blank_base |
build,
can_set_h,
can_set_w,
draw_area_h,
draw_area_w,
draw_area_x_off,
draw_area_y_off,
h,
set_draw_area_h,
set_draw_area_w,
set_h,
set_w,
w |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
transparent_blank
public transparent_blank(int size_kind,
int req_w,
int req_h)
- Construct a blank based on either an exterior or an interior size
request (as indicated by size_kind being either EXTERIOR_SIZED, or
INTERIOR_SIZED respectively, which we promptly ignore since they are
the same for us).
- Parameters:
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.int
- req_w requested width.int
- req_h requested height.
transparent_blank
public transparent_blank(int w_kind,
int req_w,
int h_kind,
int req_h)
- Construct a blank based on either an exterior or an interior size
requests (as indicated by size_kind being either EXTERIOR_SIZED, or
INTERIOR_SIZED respectively, which we promptly ignore since they are
the same for us).
- Parameters:
int
- w_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.int
- req_w requested width.int
- h_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.int
- req_h requested height.
build
public blank build(int w_kind,
int req_w,
int h_kind,
int req_h)
- Create a new blank of a given size using this one as a prototype. Sizes
can be specified as interior size (indicating allowable internal drawing
area) or exterior size (indicating the bound of the resulting blank) by
coding INTERIOR_SIZED or EXTERIOR_SIZED respectively. In our case
interior and exterior size is the same, so we promptly ignore the sizing
type.
- Parameters:
int
- w_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.int
- req_w requested width.int
- h_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.int
- req_h requested height.- Returns:
- blank a new blank constructed based on this one as a prototype.
- Overrides:
- build in class blank_base
draw_self
public 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. In our case this
is easy since we draw nothing.
- Parameters:
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.- Overrides:
- draw_self in class blank_base