[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

TPTCSurfaceFactory

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Creates a linear array of pixels.

Declaration

Source position: surfaced.inc line 34

type TPTCSurfaceFactory = class

  class function CreateNew();

  

Creates a surface with given dimensions and a pixel format.

end;

Inheritance

TPTCSurfaceFactory

  

Creates a linear array of pixels.

|

TObject

Description

A linear array of pixels.

The surface class represents a linear array of pixels in system memory. The surface class manages information about the array of pixels, such as its width, height, pitch, pixel format and palette. It provides routines for loading pixels to the surface, saving surface pixels to another buffer, copying surface pixels to other surfaces and clearing surface pixels to a specified color. The surface class also manages a clipping rectangle through which all area parameters are first passed to ensure that no load, save, copy or clear operation can write outside of surface memory. Surface pitch is always equal to width * format.bytes. This means that surface memory is always linear - the first pixel of line y+1 is immediately after the last pixel of line y in memory for all lines y in the surface. Be warned, although the objects, created by TPTCSurfaceFactory guarantee linear memory, IPTCSurface generally does not!

The documentation of this class only provides an overview for most members, for details see IPTCSurface.