|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.style.composition_part_base | +--sub_arctic.style.blank_base | +--sub_arctic.style.hv_fill_blank | +--sub_arctic.style.hv_fill_prog_blank
This class is intended to allow you create blanks with code, rather than images (see hv_fill_image_blank.java for that). The idea here is that you are looking for a programmatic bevel which can be expressed as an array of colors. So you pass an array of colors to use for the strips of color along the top, another array for the strips of color along the bottom, etc.
Field Summary | |
protected java.awt.Color |
_base_col
This holds the base color for this blank (the color of the background). |
protected java.awt.Color[] |
_bot_col
This holds the array of colors for the bevelling at the bottom. |
protected java.awt.Color[] |
_left_col
This holds the array of colors for the bevelling on the left. |
protected java.awt.Color[] |
_right_col
This holds the array of colors for the bevelling on the right. |
protected java.awt.Color[] |
_top_col
This holds the array of colors for the bevelling at the top. |
Fields inherited from class sub_arctic.style.blank_base |
_draw_area_h,
_draw_area_w,
_draw_area_x_off,
_draw_area_y_off,
_h,
_w |
Fields inherited from class sub_arctic.style.composition_part_base |
_feature_points,
_x,
_y |
Constructor Summary | |
hv_fill_prog_blank(int w_kind,
int req_w,
int h_kind,
int req_h,
java.awt.Color[] left,
java.awt.Color[] right,
java.awt.Color[] top,
java.awt.Color[] bot,
java.awt.Color base)
Construct a blank from an interior or exterior size. |
Method Summary | |
java.awt.Color |
base_col()
Return the color being used for this blank's background. |
java.awt.Color[] |
bot_col()
Return the array of colors being used for this blank's bottom. |
blank |
build(int w_kind,
int req_w,
int h_kind,
int req_h)
This routine clones this blank to create another one using the same color strips for bevelling. |
void |
draw_self(drawable on_surface,
int at_x,
int at_y)
This is the real brains of this outfit. |
java.awt.Color[] |
left_col()
Return the array of colors being used for this blank's left. |
java.awt.Color[] |
right_col()
Return the array of colors being used for this blank's right. |
java.awt.Color[] |
top_col()
Return the array of colors being used for this blank's top. |
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 sub_arctic.style.composition_part_base |
feature_point,
num_feature_points,
set_feature_points,
set_x,
set_y,
toString,
x,
y |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.awt.Color[] _top_col
protected java.awt.Color[] _bot_col
protected java.awt.Color[] _left_col
protected java.awt.Color[] _right_col
protected java.awt.Color _base_col
Constructor Detail |
public hv_fill_prog_blank(int w_kind, int req_w, int h_kind, int req_h, java.awt.Color[] left, java.awt.Color[] right, java.awt.Color[] top, java.awt.Color[] bot, java.awt.Color base)
The other parameters are just like they are in our superclass, the exterior/interior sizing and the requested size in width and height.
Warning: We don't do sanity checks to make sure you provide a reasonable number of colors in the arrays. Most likely you could never want these arrays to have more than 4 elements, and probably just 1 or 2. Further, you probably want certain kinds of symmetry (such as all the sides have the same amount of bevelling) but we can't determine what you want so you have to just be careful.
int
- w_kind either EXTERIOR_SIZED, or INTERIOR_SIZED
to indicate whether the given width request
is for the exterior size of the image or
the interior drawing area within the blank.int
- req_w requested width.int
- w_kind either EXTERIOR_SIZED, or INTERIOR_SIZED
to indicate whether the given height
request is for the exterior size of the
image or the interior drawing area within
the blank.int
- req_h requested height.Color[]
- left array of bevelling colors for the leftColor[]
- right array of bevelling colors for the rightColor[]
- top array of bevelling colors for the topColor[]
- bot array of bevelling colors for the bottomColor
- base the base color for drawingMethod Detail |
public java.awt.Color[] top_col()
public java.awt.Color[] bot_col()
public java.awt.Color[] left_col()
public java.awt.Color[] right_col()
public java.awt.Color base_col()
public blank build(int w_kind, int req_w, int h_kind, int req_h)
int
- w_kind either EXTERIOR_SIZED or INTERIOR_SIZED to indicate
whether the width 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
- h_kind either EXTERIOR_SIZED or INTERIOR_SIZED to indicate
whether the height 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_h requested height.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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |