File tag/ImageRep


class tag.ImageRep

Inherits

State supers
tom.State, tag

variables

static tom.MutableArray registered;
The registered ImageRep classes.

Creating an NSImageRep

methods

instance (id)
  imageRepWithContentsOfFile tom.String filename;
In subclasses that respond to imageFileTypes and imageRepWithData:, returns an object that has been initialized with the data in filename. NSImageRep's implementation returns an instance of the appropriate registered subclass.

tom.Indexed
  imageRepsWithContentsOfFile tom.String filename;
In subclasses that respond to imageFileTypes and imageRepWithData: (or imageRepWithData:), returns an array of objects that have been initialized with the data in filename. NSImageRep's implementation returns an array of objects (each an instance of the appropriate registered subclass) that have been initialized with the data in filename.

instance (id)
  imageRepWithPasteboard Pasteboard pasteboard;
In subclasses that respond to imagePasteboardTypes and imageRepWithData:, returns an object that has been initialized with the data in pasteboard. NSImageRep's implementation returns an instance of the appropriate registered subclass.

tom.Indexed
  imageRepsWithPasteboard Pasteboard pasteboard;
In subclasses that respond to imagePasteboardTypes and imageRepsWithData: (or imageRepWithData:), returns an array of objects that have been initialized with the data in pasteboard. NSImageRep's implementation returns an array of objects (each an instance of the appropriate registered subclass) that have been initialized with the data in pasteboard.

Checking Data Types

deferred boolean
  canInitWithData tom.Data data;
Overridden in subclasses to return YES if the receiver can initialize itself from data.

deferred boolean
  canInitWithPasteboard Pasteboard pasteboard;
Overridden in subclasses to return YES if the receiver can initialize itself from pasteboard.

deferred tom.Indexed
  imageFileTypes;
Returns an array of strings representing all file types.

deferred tom.Indexed
  imagePasteboardTypes;
Returns an array of strings representing all pasteboard types.

deferred tom.Indexed
  imageUnfilteredFileTypes;
Returns an array of strings representing directly supported file types.

deferred tom.Indexed
  imageUnfilteredPasteboardTypes;
Returns an array of strings representing directly supported pasteboards.

Managing NSImageRep Subclasses

class (ImageRep)
  imageRepClassForData tom.Data data;
Return the ImageRep subclass that handles data of type data.

class (ImageRep)
  imageRepClassForFileType tom.String type;
Return the ImageRep subclass that handles data of file type type.

class (ImageRep)
  imageRepClassForPasteboardType tom.String type;
Return the ImageRep subclass that handles data of pasteboard type type.

void
  registerImageRepClass class (ImageRep) rep_class;
Adds rep_class to the registry of available ImageRep classes.

tom.Indexed
  registeredImageRepClasses;
Return the registered ImageRep classes.

void
  unregisterImageRepClass class (ImageRep) rep_class;
Remove rep_class from the registry of available ImageRep classes.

instance tag.ImageRep

variables

float width;
The size.
float height;

Setting the Size of the Image

methods

void
  setSize (float, float) (w, h);
Set the size of the image.

(float, float)
  size;
Return the size of the image.

Specifying Information about the Representation

deferred int
  bitsPerSample;
Returns the number of bits per pixel in each component.

deferred int
  colorSpaceName;
Returns the name of the image's color space.

deferred boolean
  hasAlpha;
Returns whether there is a coverage component.

deferred boolean
  isOpaque;
Returns whether the representation is opaque.

int
  pixelsHigh;
Return the height specified in the image data.

int
  pixelsWide;
Return the width specified in the image data.

deferred void
  setAlpha boolean flag;
Informs the receiver whether there is a coverage component.

deferred void
  setBitsPerSample int bps;
Informs the receiver there are anInt bits/pixel in a component.

deferred void
  setColorSpaceName tom.String name;
Informs the receiver of the image's color space.

deferred void
  setOpaque boolean flag;
Informs the receiver of the image's opacity.

deferred void
  setPixelsHigh int h;
Informs the receiver that its data is for an image anInt pixels high.

deferred void
  setPixelsWide int w;
Informs the receiver that its data is for an image anInt pixels wide.

Drawing the Image

deferred boolean
  draw;
Implemented by subclasses to draw the image.

deferred boolean
  drawAtPoint (float, float) (x, y);
Modifies current coordinates so the image is drawn at aPoint.

deferred boolean
  drawInRect (float, float, float, float) (x, y, w, h);
Modifies current coordinates so the image is drawn in aRect.


Generated by tm 1.01.