org.jfree.pixie.wmf.records
Class MfCmdDibBitBlt

java.lang.Object
  extended by org.jfree.pixie.wmf.records.MfCmd
      extended by org.jfree.pixie.wmf.records.MfCmdDibBitBlt
All Implemented Interfaces:
ROPConstants

public class MfCmdDibBitBlt
extends MfCmd
implements ROPConstants

BitBlockTransfer - Copies PixelData of a rectangle to another position

 BOOL BitBlt(
 HDC hdcDest, // handle to destination DC
 int nXDest,  // x-coord of destination upper-left corner
 int nYDest,  // y-coord of destination upper-left corner
 int nWidth,  // width of destination rectangle
 int nHeight, // height of destination rectangle
 HDC hdcSrc,  // handle to source DC
 int nXSrc,   // x-coordinate of source upper-left corner
 int nYSrc,   // y-coordinate of source upper-left corner
 DWORD dwRop  // raster operation code
 );
 


Field Summary
 
Fields inherited from interface org.jfree.pixie.wmf.ROPConstants
BLACKNESS, DSTINVERT, MERGECOPY, MERGEPAINT, NOTSRCCOPY, NOTSRCERASE, PATCOPY, PATINVERT, PATPAINT, R2_BLACK, R2_COPYPEN, R2_LAST, R2_MASKNOTPEN, R2_MASKPEN, R2_MASKPENNOT, R2_MERGENOTPEN, R2_MERGEPEN, R2_MERGEPENNOT, R2_NOP, R2_NOT, R2_NOTCOPYPEN, R2_NOTMASKPEN, R2_NOTMERGEPEN, R2_NOTXORPEN, R2_WHITE, R2_XORPEN, SRCAND, SRCCOPY, SRCERASE, SRCINVERT, SRCPAINT, WHITENESS
 
Constructor Summary
MfCmdDibBitBlt()
           
 
Method Summary
 java.awt.Rectangle getDestination()
           
 int getFunction()
          Reads the function identifier.
 java.awt.image.BufferedImage getImage()
           
 MfCmd getInstance()
          Creates a empty unintialized copy of this command implementation.
 int getOperation()
           
 java.awt.Point getOrigin()
           
 MfRecord getRecord()
          Creates a new record based on the data stored in the MfCommand.
 java.awt.Rectangle getScaledDestination()
           
 java.awt.Point getScaledOrigin()
           
 java.awt.Rectangle getScaledSource()
           
 java.awt.Rectangle getSource()
           
 void replay(WmfFile file)
          Replays the command on the given WmfFile.
protected  void scaleXChanged()
          A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted.
protected  void scaleYChanged()
          A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted.
 void setDestination(int x, int y, int w, int h)
           
 void setImage(java.awt.image.BufferedImage image)
           
 void setOperation(int op)
           
 void setOrigin(int x, int y)
           
 void setRecord(MfRecord record)
          Reads the command data from the given record and adjusts the internal parameters according to the data parsed.
 java.lang.String toString()
           
 
Methods inherited from class org.jfree.pixie.wmf.records.MfCmd
applyScaleX, applyScaleY, getScaledHeight, getScaledWidth, getScaledX, getScaledY, scaleRect, setScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MfCmdDibBitBlt

public MfCmdDibBitBlt()
Method Detail

getImage

public java.awt.image.BufferedImage getImage()

setImage

public void setImage(java.awt.image.BufferedImage image)

replay

public void replay(WmfFile file)
Replays the command on the given WmfFile.

Specified by:
replay in class MfCmd
Parameters:
file - the meta file.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

scaleXChanged

protected void scaleXChanged()
A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted.

Specified by:
scaleXChanged in class MfCmd

scaleYChanged

protected void scaleYChanged()
A callback function to inform the object, that the x scale has changed and the internal coordinate values have to be adjusted.

Specified by:
scaleYChanged in class MfCmd

getInstance

public MfCmd getInstance()
Creates a empty unintialized copy of this command implementation.

Specified by:
getInstance in class MfCmd
Returns:
a new instance of the command.

getFunction

public int getFunction()
Reads the function identifier. Every record type is identified by a function number corresponding to one of the Windows GDI functions used.

Specified by:
getFunction in class MfCmd
Returns:
the function identifier.

setOrigin

public void setOrigin(int x,
                      int y)

getOrigin

public java.awt.Point getOrigin()

getSource

public java.awt.Rectangle getSource()

getScaledOrigin

public java.awt.Point getScaledOrigin()

getScaledSource

public java.awt.Rectangle getScaledSource()

setDestination

public void setDestination(int x,
                           int y,
                           int w,
                           int h)

getDestination

public java.awt.Rectangle getDestination()

getScaledDestination

public java.awt.Rectangle getScaledDestination()

setOperation

public void setOperation(int op)

getOperation

public int getOperation()

getRecord

public MfRecord getRecord()
                   throws RecordCreationException
Creates a new record based on the data stored in the MfCommand.

Specified by:
getRecord in class MfCmd
Returns:
the created record.
Throws:
RecordCreationException

setRecord

public void setRecord(MfRecord record)
Reads the command data from the given record and adjusts the internal parameters according to the data parsed.

After the raw record was read from the datasource, the record is parsed by the concrete implementation.

Specified by:
setRecord in class MfCmd
Parameters:
record - the raw data that makes up the record.