|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.models.impl.LShape
net.sf.latexdraw.glib.models.impl.LPositionShape
net.sf.latexdraw.glib.models.impl.LPicture
class LPicture
Defines a model of a picture.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
07/05/2009
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape |
---|
IShape.BorderPos, IShape.FillingStyle, IShape.LineStyle, IShape.Position |
Field Summary | |
---|---|
protected java.awt.Image |
image
The buffered image. |
protected java.lang.String |
pathSource
The path of the source image. |
protected java.lang.String |
pathTarget
The path of the eps image. |
Fields inherited from class net.sf.latexdraw.glib.models.impl.LShape |
---|
arrows, bordersPosition, dashSepBlack, dashSepWhite, dbleBordCol, dbleBordSep, dotSep, fillingCol, fillingStyle, gradAngle, gradColEnd, gradColStart, gradMidPt, hasDbleBord, hasShadow, hatchingsAngle, hatchingsCol, hatchingsSep, hatchingsWidth, id, lineColour, lineStyle, modified, opacity, points, rotationAngle, shadowAngle, shadowCol, shadowSize, showPts, thickness |
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape |
---|
GOLDEN_ANGLE, PPC |
Constructor Summary | |
---|---|
protected |
LPicture(boolean isUniqueID,
IPoint pt)
Creates a picture and the corresponding EPS picture. |
Method Summary | |
---|---|
void |
copy(IShape sh)
Copies a shape using another. |
protected void |
createEPSImage()
Creates an EPS image from the source one. |
IPicture |
duplicate()
Creates a duplicate of the shape (however id are not the same). |
int |
getHeight()
|
java.awt.Image |
getImage()
|
java.lang.String |
getPathSource()
|
java.lang.String |
getPathTarget()
|
int |
getWidth()
|
boolean |
isColourable()
|
protected void |
loadImage()
Loads the image using the source path and creates the eps picture. |
void |
setPathSource(java.lang.String pathSource)
Sets the new picture. |
Methods inherited from class net.sf.latexdraw.glib.models.impl.LPositionShape |
---|
getPosition, getX, getY, setPosition, setPosition, setX, setY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IPositionShape |
---|
getPosition, getX, getY, setPosition, setPosition, setX, setY |
Methods inherited from interface org.malai.properties.Modifiable |
---|
isModified, setModified |
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IArrowable |
---|
getArrowInset, getArrowLength, getArrowSizeDim, getArrowSizeNum, getBracketNum, getDotSizeDim, getDotSizeNum, getRBracketNum, getTBarSizeDim, getTBarSizeNum, setArrowInset, setArrowLength, setArrowSizeDim, setArrowSizeNum, setBracketNum, setDotSizeDim, setDotSizeNum, setRBracketNum, setTBarSizeDim, setTBarSizeNum |
Field Detail |
---|
protected java.awt.Image image
protected java.lang.String pathTarget
protected java.lang.String pathSource
Constructor Detail |
---|
protected LPicture(boolean isUniqueID, IPoint pt)
isUniqueID
- True: the shape will have a unique ID.pt
- The position of the top-left point of the picture.
java.lang.IllegalArgumentException
- If the given picture path is not valid.Method Detail |
---|
protected void loadImage() throws java.io.IOException
java.io.IOException
- If the picture cannot be loaded.public void copy(IShape sh)
IShape
copy
in interface IShape
copy
in class LShape
sh
- The shape to copy.protected void createEPSImage() throws java.io.IOException
java.io.IOException
- If a problem while reading/writing files occurs.
java.io.IOException
- If the writing is not possible.public int getHeight()
getHeight
in interface IPicture
public java.awt.Image getImage()
getImage
in interface IPicture
public java.lang.String getPathSource()
getPathSource
in interface IPicture
public java.lang.String getPathTarget()
getPathTarget
in interface IPicture
public int getWidth()
getWidth
in interface IPicture
public void setPathSource(java.lang.String pathSource) throws java.io.IOException
IPicture
setPathSource
in interface IPicture
pathSource
- the pathSource to set.
java.io.IOException
- If a problem while reading/writing pictures occurs.public IPicture duplicate()
IShape
duplicate
in interface IPicture
duplicate
in interface IShape
duplicate
in class LShape
public boolean isColourable()
isColourable
in interface IShape
isColourable
in class LShape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |