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

IPTCArea

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

A rectangular area.

Declaration

Source position: aread.inc line 34

type IPTCArea = interface

  function GetLeft;

  

  function GetTop;

  

  function GetRight;

  

  function GetBottom;

  

  function GetWidth;

  

  function GetHeight;

  

  function Equals();

  

  property Left: Integer; [r]

  

Gets the left coordinate of the area.

  property Top: Integer; [r]

  

Gets the top coordinate of the area.

  property Right: Integer; [r]

  

Gets the right coordinate of the area.

  property Bottom: Integer; [r]

  

Gets the bottom coordinate of the area.

  property Width: Integer; [r]

  

Gets the width of the area.

  property Height: Integer; [r]

  

Gets the height of the area.

end;

Inheritance

IPTCArea

  

A rectangular area.

Description

A rectangular area.

The area class represents a rectangle of pixels. It is typically used to select certain areas of pixels for operations such as copying, and clearing. The most important thing to understand about area objects is that zero areas represent zero areas. This means that an area object TPTCAreaFactory.CreateNew(0,0,0,0) covers zero pixels, instead of one pixel. An area TPTCAreaFactory.CreateNew(0,0,1,1) covers a single pixel, even though the points (0,0) and (1,1) span over a 2x2 block of pixels. Another way to think about it is that the top-left coordinate is inclusive and the bottom-right coordinate is exclusive.

See IPTCSurface.Load, IPTCSurface.Save, IPTCSurface.Copy, and IPTCSurface.Clear for examples of the use of areas.