sub_arctic.style
Class image_comp_part
java.lang.Object
|
+--sub_arctic.style.composition_part_base
|
+--sub_arctic.style.image_comp_part
- public class image_comp_part
- extends composition_part_base
This class provides composition_part based on a fixed size image.
- See Also:
composer
Method Summary |
void |
draw_self(drawable on_surf,
int at_x,
int at_y)
Draw the object on the given drawing surface at the given location. |
int |
h()
Current height of the object. |
void |
set_the_image(loaded_image img)
Set the image for this part. |
loaded_image |
the_image()
The image for this part. |
int |
w()
Current width of the object. |
Methods inherited from class sub_arctic.style.composition_part_base |
can_set_h,
can_set_w,
feature_point,
num_feature_points,
set_feature_points,
set_h,
set_w,
set_x,
set_y,
toString,
x,
y |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
_the_image
protected loaded_image _the_image
- The image for this part.
image_comp_part
public image_comp_part(int x_pos,
int y_pos,
loaded_image img,
java.awt.Point[] feature_pts)
- Full constructor.
- Parameters:
int
- x_pos x position of this part.int
- y_pos y position of this part.loaded_image
- img the image to build this part from.Point[]
- feature_pts the set of feature points for this part
(or null to indicate none).
image_comp_part
public image_comp_part(loaded_image img,
java.awt.Point[] feature_pts)
- Constructor with default position of 0,0.
- Parameters:
loaded_image
- img the image to build this part from.Point[]
- feature_pts the set of feature points for this part
(or null to indicate none).
image_comp_part
public image_comp_part(loaded_image img)
- Constructor with default position of 0,0, and no feature points.
- Parameters:
loaded_image
- img the image to build this part from.
the_image
public loaded_image the_image()
- The image for this part.
- Returns:
- loaded_image the image for this part.
set_the_image
public void set_the_image(loaded_image img)
- Set the image for this part.
w
public int w()
- Current width of the object. This is determined from the image.
- Returns:
- int the width of the object
- Overrides:
- w in class composition_part_base
h
public int h()
- Current height of the object. This is determined from the image.
object.
- Returns:
- int the height of the object
- Overrides:
- h in class composition_part_base
draw_self
public void draw_self(drawable on_surf,
int at_x,
int at_y)
- Draw the object on the given drawing surface at the given location.
- Parameters:
drawable
- on_surf the drawing surface to draw on.int
- at_x the x location to draw at.int
- at_y the y location to draw at.- Overrides:
- draw_self in class composition_part_base