    001package org.vishia.gral.swt;
    002
    003import org.eclipse.swt.graphics.Image;
    004import org.vishia.gral.ifc.GralImageBase;
    005import org.vishia.gral.ifc.GralRectangle;
    006
    007public class SwtImage extends GralImageBase
    008{
    009  final Image image;
    010
    011  public SwtImage(Image oImage)
    012  {
    013    super(oImage);
    014    this.image = oImage;
    015  }
    016
    017  public GralRectangle getPixelSize()
    018  { org.eclipse.swt.graphics.ImageData data = image.getImageData();
    019    GralRectangle rr = new GralRectangle(0, 0, data.width, data.height);
    020    return rr;
    021  }
    022
    023
    024}