|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object android.image.Image android.image.Scene
public abstract class Scene
An abstract Class representing a Scene (a cropped Image
). Images
can be placed on a Scene
at a specific location, resulting in a
new Scene
.
new EmptyScene(48, 48).placeImage(new Triangle(32, "solid", "red"), 24, 24)
new EmptyScene(48, 48).placeImage(new Triangle(64, "solid", "red"), 24, 24)
new EmptyScene(48, 48).addLine(0, 0, 48, 48, "blue")
new EmptyScene(48, 48).addLine(4, 24, 44, 24, "green")
new EmptyScene(50, 50) .placeImage(new Overlay(new Circle(20, "outline", "black"), new Circle(20, "solid", "wheat")), 25, 25) .placeImage(new Circle(5, "solid", "lightblue"), 18, 20) .placeImage(new Rectangle(10, 3, "solid", "lightblue"), 33, 20) .placeImage(new Ellipse(20, 8, "solid", "red"), 25, 35)
Field Summary |
---|
Fields inherited from class android.image.Image |
---|
BLACK_OUTLINE, CLEAR, WHITE |
Method Summary | |
---|---|
Scene |
addLine(double x,
double y,
double xx,
double yy,
java.lang.String color)
Add a line to this Scene from (x,y) to (xx, yy) |
Scene |
addLine(int x,
int y,
int xx,
int yy,
java.lang.String color)
Add a line to this Scene from (x,y) to (xx, yy) |
Scene |
addLine(Posn p1,
Posn p2,
java.lang.String color)
Add a line to this Scene from the first Posn to the second |
abstract void |
paint(android.graphics.Canvas c,
int x,
int y)
Draw the scene into a Graphics |
Scene |
placeImage(Image i,
double x,
double y)
Place another Image on top of this Scene at (x,y) |
Scene |
placeImage(Image i,
int x,
int y)
Place another Image on top of this Scene at (x,y) |
Scene |
placeImage(Image i,
Posn p)
Place another Image on top of this Scene at the given Posn |
boolean |
toFile(java.lang.String name)
Save this Scene to a File |
Methods inherited from class android.image.Image |
---|
flipHorizontal, flipVertical, height, overlay, overlay, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, rasterize, rotate, rotate, toScene, toWhiteFile, toWhiteScene, width |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract void paint(android.graphics.Canvas c, int x, int y)
paint
in class Image
public Scene placeImage(Image i, double x, double y)
public Scene placeImage(Image i, int x, int y)
public Scene placeImage(Image i, Posn p)
public Scene addLine(int x, int y, int xx, int yy, java.lang.String color)
public Scene addLine(double x, double y, double xx, double yy, java.lang.String color)
public Scene addLine(Posn p1, Posn p2, java.lang.String color)
public boolean toFile(java.lang.String name)
toFile
in class Image
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |