public class ODrawArea
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
ODrawArea(com.sun.star.awt.Point position,
com.sun.star.awt.Size size)
Constructs a drawing area from a Point and a Size.
|
ODrawArea(com.sun.star.awt.Rectangle rect)
Constructs a drawing area from a com.sun.star.awt.Rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
ODrawArea |
changeHeight(int amount)
Changes the area's height.
|
ODrawArea |
changeWidth(int amount)
Changes the area's width.
|
ODrawArea |
changeX(int amount)
Changes the area's X position.
|
ODrawArea |
changeY(int amount)
Changes the area's Y position.
|
java.lang.Object |
clone()
Does a deep clone of the area.
|
com.sun.star.awt.Point |
endPos()
Returns the botton right position of the area.
|
ODrawArea |
fitToBitmap(ORootDoc doc,
java.lang.String bitmapUrl)
Best fits the area to match a bitmap, so that the area has the same shape as the bitmap, and
there is no empty space around the bitmap.
|
int |
height()
Returns the area's height.
|
com.sun.star.awt.Point |
position()
Returns the area's position.
|
com.sun.star.awt.Rectangle |
rectangle()
Returns the com.sun.star.awt.Rectangle corresponding to the area.
|
ODrawArea |
reshape(float widthFrac,
float heightFrac)
Reshapes the area.
|
com.sun.star.awt.Size |
size()
Returns the area's size.
|
java.lang.String |
toString()
Returns a string representation of the area.
|
int |
width()
Returns the area's width.
|
int |
xPos()
Returns the area's X position.
|
int |
yPos()
Returns the area's Y position.
|
public ODrawArea(com.sun.star.awt.Point position,
com.sun.star.awt.Size size)
position - the top left position of the areasize - the rectangular size of the areapublic ODrawArea(com.sun.star.awt.Rectangle rect)
rect - the rectanglepublic com.sun.star.awt.Point position()
public com.sun.star.awt.Size size()
public int width()
public int height()
public int xPos()
public int yPos()
public com.sun.star.awt.Point endPos()
public com.sun.star.awt.Rectangle rectangle()
public java.lang.String toString()
toString in class java.lang.Objectpublic ODrawArea changeX(int amount)
amount - the amount of changepublic ODrawArea changeY(int amount)
amount - the amount of changepublic ODrawArea changeWidth(int amount)
amount - amount of changepublic ODrawArea changeHeight(int amount)
amount - amount of changepublic ODrawArea reshape(float widthFrac, float heightFrac) throws com.sun.star.uno.Exception
widthFrac - the fractional change in the widthheightFrac - the fractional change in the heightcom.sun.star.uno.Exceptionpublic ODrawArea fitToBitmap(ORootDoc doc, java.lang.String bitmapUrl) throws com.sun.star.uno.Exception
doc - document used for reading the bitmapbitmapUrl - the bitmap URLcom.sun.star.uno.Exceptionpublic java.lang.Object clone()
clone in class java.lang.Object