com.develop.util
Class PictureConverter

java.lang.Object
  extended bycom.develop.util.PictureConverter

public class PictureConverter
extends java.lang.Object

Class PictureConverter. The helper for picture conversions

Author:
Vitally Shelest

Method Summary
static java.awt.image.BufferedImage getBufferedImage(DispatchPtr picture, int width, int height)
          Converts IPictureDisp to Image
static DispatchPtr getCOMPicture(java.awt.image.BufferedImage img)
          Converts Image to IPictureDisp
static int getHeightfromHIMETRIC(int height)
          Converts HIMETRIC height to Device points
static int getWidthfromHIMETRIC(int width)
          Converts HIMETRIC width to Device points
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCOMPicture

public static DispatchPtr getCOMPicture(java.awt.image.BufferedImage img)
                                 throws COMException
Converts Image to IPictureDisp

Parameters:
img -
Returns:
IDispatch object of Picture
Throws:
COMException

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(DispatchPtr picture,
                                                            int width,
                                                            int height)
                                                     throws COMException
Converts IPictureDisp to Image

Parameters:
picture -
width -
height -
Returns:
Buffered Image
Throws:
COMException

getWidthfromHIMETRIC

public static int getWidthfromHIMETRIC(int width)
Converts HIMETRIC width to Device points

Parameters:
width -
Returns:
width converted

getHeightfromHIMETRIC

public static int getHeightfromHIMETRIC(int height)
Converts HIMETRIC height to Device points

Parameters:
height -
Returns:
height converted


Composia Soft Ltd. Designed by Vitally Shelest. .