Class RotatePiece
- java.lang.Object
-
- org.eclipse.nebula.paperclips.core.internal.RotatePiece
-
- All Implemented Interfaces:
PrintPiece
public final class RotatePiece extends java.lang.Object implements PrintPiece
-
-
Field Summary
Fields Modifier and Type Field Description private int
angle
private org.eclipse.swt.graphics.Device
device
private org.eclipse.swt.graphics.Transform
oldTransform
private org.eclipse.swt.graphics.Point
size
private PrintPiece
target
private org.eclipse.swt.graphics.Transform
transform
-
Constructor Summary
Constructors Constructor Description RotatePiece(org.eclipse.swt.graphics.Device device, PrintPiece target, int angle, org.eclipse.swt.graphics.Point size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes the system resources allocated by this PrintPiece.private org.eclipse.swt.graphics.Transform
getOldTransform()
org.eclipse.swt.graphics.Point
getSize()
Returns the dimensions of this PrintPiece, in pixels.private org.eclipse.swt.graphics.Transform
getTransform()
void
paint(org.eclipse.swt.graphics.GC gc, int x, int y)
Draws this PrintPiece on the given graphics device, at the given coordinates.private void
rotateTransform(org.eclipse.swt.graphics.Transform transform)
-
-
-
Field Detail
-
device
private final org.eclipse.swt.graphics.Device device
-
target
private final PrintPiece target
-
angle
private final int angle
-
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
-
RotatePiece
public RotatePiece(org.eclipse.swt.graphics.Device device, PrintPiece target, int angle, org.eclipse.swt.graphics.Point size)
-
-
Method Detail
-
getSize
public org.eclipse.swt.graphics.Point getSize()
Description copied from interface:PrintPiece
Returns the dimensions of this PrintPiece, in pixels.- Specified by:
getSize
in 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:PrintPiece
Draws this PrintPiece on the given graphics device, at the given coordinates.- Specified by:
paint
in 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.
-
rotateTransform
private void rotateTransform(org.eclipse.swt.graphics.Transform transform)
-
dispose
public void dispose()
Description copied from interface:PrintPiece
Disposes 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:
dispose
in interfacePrintPiece
-
-