Class ScalePiece
- java.lang.Object
-
- org.eclipse.nebula.paperclips.core.ScalePiece
-
- All Implemented Interfaces:
PrintPiece
final class ScalePiece extends java.lang.Object implements PrintPiece
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.graphics.Devicedeviceprivate org.eclipse.swt.graphics.TransformoldTransformprivate doublescaleprivate org.eclipse.swt.graphics.Pointsizeprivate PrintPiecetargetprivate org.eclipse.swt.graphics.Transformtransform
-
Constructor Summary
Constructors Constructor Description ScalePiece(org.eclipse.swt.graphics.Device device, PrintPiece target, double scale, int maxWidth, int maxHeight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes the system resources allocated by this PrintPiece.private org.eclipse.swt.graphics.TransformgetOldTransform()org.eclipse.swt.graphics.PointgetSize()Returns the dimensions of this PrintPiece, in pixels.private org.eclipse.swt.graphics.TransformgetTransform()voidpaint(org.eclipse.swt.graphics.GC gc, int x, int y)Draws this PrintPiece on the given graphics device, at the given coordinates.
-
-
-
Field Detail
-
device
private final org.eclipse.swt.graphics.Device device
-
target
private final PrintPiece target
-
scale
private final double scale
-
size
private final org.eclipse.swt.graphics.Point size
-
oldTransform
private org.eclipse.swt.graphics.Transform oldTransform
-
transform
private org.eclipse.swt.graphics.Transform transform
-
-
Constructor Detail
-
ScalePiece
ScalePiece(org.eclipse.swt.graphics.Device device, PrintPiece target, double scale, int maxWidth, int maxHeight)
-
-
Method Detail
-
getSize
public org.eclipse.swt.graphics.Point getSize()
Description copied from interface:PrintPieceReturns the dimensions of this PrintPiece, in pixels.- Specified by:
getSizein interfacePrintPiece- Returns:
- the dimensions of this PrintPiece, in pixels.
-
getOldTransform
private org.eclipse.swt.graphics.Transform getOldTransform()
-
getTransform
private org.eclipse.swt.graphics.Transform getTransform()
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, int x, int y)Description copied from interface:PrintPieceDraws this PrintPiece on the given graphics device, at the given coordinates.- Specified by:
paintin interfacePrintPiece- Parameters:
gc- a graphics context for the graphics device.x- the x coordinate where this PrintPiece will be drawn.y- the x coordinate where this PrintPiece will be drawn.
-
dispose
public void dispose()
Description copied from interface:PrintPieceDisposes the system resources allocated by this PrintPiece. The dispose method is not a permanent disposal of a PrintPiece. It is intended to reclaim system resources, however future calls to paint(GC,int,int) may require that the resources be allocated again.- Specified by:
disposein interfacePrintPiece
-
-