Unit PXL.Canvas

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Canvas specification that can draw variety of shapes including lines, triangles, hexagons and images with different blending effects, colors and transparency.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TCustomCanvas Abstract canvas definition that provides few basic functions that need to be implemented by derived classes and many different rendering functions that internally use basic functions to do the rendering.
Class TCustomCanvasEffect Abstract definition for canvas effect.
Class TCustomCanvasImage Abstract image that can be rendered with canvas.
Class TCustomCanvasParent Abstract class definition that can hold a child reference to canvas.

Types

TBlendingEffect = (...);
TCanvasAttribute = (...);
TCanvasAttributes = set of TCanvasAttribute;

Description

Types

TBlendingEffect = (...);

The blending effect that should be applied when drawing 2D primitives.

Values
  • Unknown: Undefined blending effect. This means that blending effect has not been defined - this is used internally and should not be used otherwise.

  • None: Blending effect disabled. In this case, drawing operation is just copy operation.
  • Normal: Normal blending effect. If drawing primitive has alpha-channel supplied, it will be alpha-blended to the destination depending on source alpha values.

  • Shadow: Shadow drawing effect. The destination surface will be multiplied by alpha-channel of the source primitive; thus, the rendered image will look like a shadow.

  • Add: Additive blending effect. The source primitive will be multiplied by its alpha-channel and then added to the destination with saturation.

  • Multiply: Multiplication blending effect. The destination surface will be multiplied by the source primitive.

  • InverseMultiply: Inverse multiplication effect. The destination surface will be multiplied by an inverse of the source primitive.

  • SourceColor: Source color blending effect. Instead of using alpha-channel, the grayscale value of source primitive's pixels will be used as an alpha value for blending on destination.

  • SourceColorAdd: Source color additive blending effect. Instead of using alpha-channel, the grayscale value of source primitive's pixels will be used as an alpha value for multiplying source pixels, which will then be added to destination with saturation.

TCanvasAttribute = (...);

Canvas attribute that defines rendering behavior attributes.

Values
  • Antialias: Antialiasing should be used when rendering images. For typical implementations this means that bilinear filtering will be used when interpolating image pixels.
  • MipMapping: Mipmapping should be used when rendering images. If this attribute is not included, then mipmapping will be disabled even if the image to be rendered contains mipmaps.
  • CustomEffect: Custom shader effect will be used when rendering images. This effect needs to be set and configured prior drawing.
TCanvasAttributes = set of TCanvasAttribute;

A set of one or multiple canvas attributes.


Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.