Graphic¶
Qualified name: delphivcl.Graphic
- class Graphic¶
Bases:
Persistent
TGraphic is the abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images. TGraphic is an abstract class that cannot be instantiated. Descendant graphics objects override many of the methods of TGraphic to address the needs of their particular file format and graphical characteristics. TGraphic also introduces methods that work with TPicture objects and the Clipboard. Properties of TGraphic provide information about the state and size of the graphic image. When the type of graphic is known, store the graphic in its specific type object. Otherwise, use a TPicture object that can hold any type of TGraphic.
Methods
Responds after the last constructor has executed.
CanLoadFromStream returns True when a specified stream contains a streamed image of a specific TGraphic subclass.
DisableScaledDrawer Disables scaled drawer for a graphic.
EnableScaledDrawer Enables scaled drawer for a graphic, which is used to scale the graphic.
Compare graphic to another TGraphic object and return true if objects contain same graphic.
Specifies the size of the graphic.
Embarcadero Technologies does not currently have any additional information.
Attributes
ClassName
Returns the TObject.ClassName
Empty
Height
bool:
Modified
Palette
PaletteModified
Returns the reference to the scaled drawer.
Indicate whether graphic supports partial transparency or an alpha channel.
Transparent
Width
- AfterConstruction()¶
Responds after the last constructor has executed. AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications. The AfterConstruction method implemented in TObject does nothing. Override this method when creating a class that performs an action after the object is created. For example, TCustomForm overrides AfterConstruction to generate an OnCreate event.
- CanLoadFromStream(Stream: Stream) bool ¶
CanLoadFromStream returns True when a specified stream contains a streamed image of a specific TGraphic subclass. The method uses current stream position, it does not change current stream position.
- DisableScaledDrawer()¶
DisableScaledDrawer Disables scaled drawer for a graphic.
See also ScaledDrawer EnableScaledDrawer
- EnableScaledDrawer(AGraphicScalerClass: ScaledGraphicDrawerClass, AInitialize: bool) None ¶
EnableScaledDrawer Enables scaled drawer for a graphic, which is used to scale the graphic. AGraphicScalerClass specifies the scaled drawer class, for example TWICScaledGraphicDrawer.
See also ScaledDrawer DisableScaledDrawer
- Equals(Obj: Object) bool ¶
Compare graphic to another TGraphic object and return true if objects contain same graphic. Equals compares the contents of two TGraphic objects. Equals returns false if the TGraphic are different classes or if they contain different graphical data.
Code Examples TGraphic (Delphi) TGraphic (C++) Compare graphic to another TGraphic object and return true if objects contain same graphic. Equals compares the contents of two TGraphic objects. Equals returns false if the TGraphic are different classes or if they contain different graphical data.
Code Examples TGraphic (Delphi) TGraphic (C++)
- IsAnimating¶
bool:
- LoadFromClipboardFormat()¶
- LoadFromFile()¶
- LoadFromStream()¶
- QueryInterface(IID: GUID, Obj) int ¶
- SaveToClipboardFormat()¶
- SaveToFile()¶
- SaveToStream()¶
- ScaledDrawer¶
Returns the reference to the scaled drawer. When the scaled drawer is enabled for graphic, then the ScaledDrawer property returns the reference to it.
See also EnableScaledDrawer
- Type:
ScaledGraphicDrawer
- SetSize(AWidth: int, AHeight: int) None ¶
Specifies the size of the graphic. Use the SetSize method to set both the height and width of the graphic. This results in better performance than setting the height and width separately.
- SupportsPartialTransparency¶
Indicate whether graphic supports partial transparency or an alpha channel. SupportsPartialTransparency indicates whether the graphic supports partial transparency or an alpha channel. Some TGraphic descendants, such as TBitmap and TPngImage, can support partial transparency or an alpha channel. When a graphic that supports partial transparency is drawn on a canvas using DrawTransparent, it should be blended with the pixels on the canvas based on the value of the alpha channel.
- Type:
bool
- UpdateScaledDrawer()¶
Embarcadero Technologies does not currently have any additional information.