Skip to main content

TdxSmartGlyph Class

A DPI-aware universal image container that can load an image from a DFM file.

Declaration

TdxSmartGlyph = class(
    TdxSmartImage,
    IdxSourceDPI,
    IdxSourceSize
)

Remarks

The TdxSmartGlyph class is a TGraphic descendant that implements a universal image container with DPI awareness support in DevExpress products. An image container [supports multiple formats] and implements an extensive API for image import, export, conversion, and draw operations.

Most DevExpress controls use TdxSmartGlyph instances to manage and display UI element icons. Refer to the list of direct class references for details.

Supported Image Formats

All supported formats are implemented as the following codec classes derived from the TdxSmartImageCodec class:

TdxGPImageCodecBMP
A Device-Independent Bitmap (BMP/DIB) image format codec.
TdxGPImageCodecGIF
A Graphics Interchange Format (GIF) codec.
TdxGPImageCodecJPEG
A Joint Photographic Experts Group (JPEG) image format codec.
TdxGPImageCodecPNG
A Portable Network Graphics (PNG) image format codec.
TdxGPImageCodecTIFF
A Tagged Image File Format (TIFF) codec.
TdxSVGImageCodec
A Scalable Vector Graphics (SVG) image format codec.
TdxGPImageCodecWMF
A Windows Metafile (WMF) image format codec.

All image format implementations (except for SVG) available in DevExpress VCL products rely on the native image format encoder functionality of the Windows Imaging Component (WIC).

Tip

You can use the ImageCodec property to identify the current image format or convert the stored image to a different bitmap format.

Main API Members

The list below outlines key members of the TdxSmartGlyph class that allow you to load and manage images in all supported formats.

Image Container Creation

This section contains TdxSmartGlyph class constructors and other methods that allow you to create image containers.

Clone
Creates a new image container populated with a copy of the stored image.
CreateSize
These overloaded methods create an image container filled with a specific color.
CreateFromBitmap | CreateFromHBitmap | CreateFromBits | CreateFromStream
Create an image container and populate it from the specified source.
GetAsBitmap
Creates a TBitmap container and populates it with the stored image.
UseDisabledSkinPaletteForSVG | UseEnabledSkinPaletteForSVG
Specify if the active vector skin palette affects the stored SVG glyph.
SourceDPI
Specifies the target monitor DPI for the stored image.
SourceWidth | SourceHeight
Specify the image container’s pixel dimensions regardless of the stored image size.

Data Import and Export

Assign | AssignFromGraphic | AssignFromSmartImage
Repopulate the image container with an image from another image container.
CopyToClipboard | CutToClipboard | PasteFromClipboard
Move image data between the image container and the clipboard.
GetBitmapBits
Returns the stored image as an array of pixel data.
LoadFromBits | LoadFromFieldValue | LoadFromResource | LoadFromFile | LoadFromStream
Repopulate the image container from the specified source.
SaveToStream | SaveToStreamByCodec
Save the stored image to a stream.
SaveToFile
Saves the stored image to a file.

Content and Resource Management

Clear
Clears the image container.
ChangeColor
Fills all pixels of the stored image with a color.
ConvertToBitmap
Rasterizes the stored vector image.
CreateCanvas | StretchDraw
Draw the stored image.
DefaultImageExifAutoRotation

Specifies the default automatic image rotation setting based on EXIF metadata.

This class property defines the default EXIF image rotation for all image editors[1] and containers in the application.

Dormant | HandleNeeded
Allow you to suspend and restore the image container to optimize GDI resource usage.
ExifAutoRotation
Allows you to explicitly enable or disable automatic image rotation based on EXIF metadata.
Flip
Flips the stored image horizontally or vertically.
ImageCodec
Specifies the format of the stored image. You can use this property to convert the stored image to any supported format, except for SVG.
MakeComposition
These overloaded functions blend two images from two image containers using the alpha channel.
Resize | Scale
Scale the source image.

Animation and Multi-Frame Image Settings

ActiveFrame
Specifies the currently displayed frame in a multi-frame image.
AnimationFrameCount
Returns the number of frames in a multi-frame image.
Animation | AnimationLoop | AnimationLoopCount | AnimationLoopIndex | StartAnimation | StopAnimation
Allow you to track and manage animation playback for the stored animated image.

General-Purpose API Members

ClientRect | Size
Return stored image dimensions.
Compare
Compares two image containers.
GetHashCode
Calculates a CRC32 hash code from stored image data.
IsAlphaUsed
Allows you to identify whether or not the stored image has transparent pixels.

Direct TdxSmartGlyph Class References

The following list groups public API members that reference a TdxSmartGlyph object by DevExpress product.

ExpressQuantumGrid

TcxCustomGridColumn.HeaderGlyph
Specifies the column header glyph.

ExpressEditors

TcxButtonImageOptions.Glyph
Specifies one or more glyphs that the button can display.
TcxCustomButton.Glyph
Specifies the image displayed within a button.
TcxCustomCheckBoxProperties.Glyph
Provides custom images for check boxes.
TcxCustomCheckComboBoxProperties.Glyph
Provides custom images for check boxes.
TcxCustomCheckGroupProperties.Glyph
Specifies one or more glyphs the check group editor can display as check box states.
TcxCustomCheckListBox.Glyph
Provides custom images for check boxes.
TcxCustomDropDownEditProperties.ButtonGlyph
Specifies the custom glyph for the drop-down button.
TcxCustomEditButton.Glyph
Specifies the custom glyph for the editor button.
TcxCustomLabelProperties.Glyph
Specifies the image used to draw the label’s caption.
TcxHintStyle.Icon
The custom icon displayed in a hint window.
TdxCustomRatingControlProperties.CheckedGlyph
Specifies an image depicting a checked element within the rating control.
TdxCustomRatingControlProperties.Glyph
Specifies an image depicting an unchecked element within the rating control.
TdxCustomRatingControlProperties.HoverGlyph
Specifies an image depicting a hot-tracked element within the rating control.
TdxToggleSwitchStateIndicator.OffGlyph
Specifies the image for the unchecked state (also called the Off state).
TdxToggleSwitchStateIndicator.OnGlyph
Specifies the image for the checked state (also called the On state).
TdxTokenEditToken.Glyph
Specifies the image associated with the token.
TdxBadgeBackground.Glyph
Specifies the image used as the badge UI adorner‘s background.
TdxGuideViewInfo.BorderGlyph
Returns the bitmap mask used to paint the guide UI adorner‘s outlines.
dxBadgeDefaultGlyph
Returns a Smart Glyph containing the default glyph for badge UI adorners.
dxGuideNormalBorderGlyph
Returns a Smart Glyph containing the bitmap mask for the normal guide UI adorner borders.
dxGuideSelectedBorderGlyph
Returns a Smart Glyph containing the bitmap mask for the borders of the selected guide UI adorner.
TdxWheelPickerItem.Glyph
Specifies the image to be displayed by the wheel item.

ExpressBars

TdxBarManager.HelpButtonGlyph
Specifies a bitmap which appears on the Help button in the Customization Form.
TdxBar.Glyph
Specifies the icon that is displayed within a collapsed Ribbon tab group bound to the current toolbar.
TdxBarItem.Glyph
Specifies the glyph that is displayed when this item’s link represents a standard size (16 by 16 pixels) item control.
TdxBarItem.LargeGlyph
Specifies the glyph that is displayed when this item’s link represents a large button, enlarged standard size button, or large size menu item.
TdxBarItemControl.Glyph
Returns the item control’s glyph.
TdxBarItemLink.Glyph
Provides access to the glyph of the item control, which corresponds to the current item link.
TdxBarItemLink.UserGlyph
Specifies a user-defined glyph.
TdxBarLargeButton.HotGlyph
Specifies the glyph that is drawn on the button when the button is selected.
TdxBarLargeButtonControl.HotGlyph
Returns the hot image associated with an item.
TdxOfficeSearchBoxProperties.Glyph
Specifies a glyph for the search box.
TdxRibbonCustomButtonPersistent.Glyph
Specifies the button’s glyph.
TdxRibbonBackstageViewTabSheet.Glyph
Specifies a glyph for a tab.
TdxRibbonGalleryGroupItem.Glyph
Specifies an explanatory image for a gallery item.
TdxRibbonGalleryGroupItem.GlyphInDropDown
TdxRibbonCustomRadialMenu.Glyph
Specifies the icon for the radial menu’s central button.
TdxCustomRibbon.BackgroundImage
Specifies the background image for the Ribbon tab area and the Ribbon Form’s non-client area painted using the Ribbon.

ExpressLibrary

TdxCustomGalleryItem.Glyph
Specifies the glyph displayed.
TdxCustomScreenTipBand.Glyph
Specifies the explanatory image for the ScreenTip section.

ExpressQuantumTreeList

TcxTreeListCaption.Glyph
Defines the image displayed within the caption.

ExpressPDFViewer

TdxPDFViewerOptionsNavigationPage.Glyph
Specifies the glyph displayed within the page’s tab on the PDF Viewer control’s Navigation pane.

ExpressLayoutControl

TdxCustomLayoutGroupButton.Glyph
Specifies a glyph for the layout group button.
TdxCustomLayoutItemCaptionOptions.Glyph
Specifies the caption’s glyph.
TdxCustomLayoutItemImageOptions.Glyph
Specifies the caption’s glyph.
TdxLayoutCheckBoxItemCheckBoxOptions.Glyph
Specifies one or more custom glyphs for a check box.

ExpressMapControl

TdxMapPointer.Image
Specifies the map point item image.

ExpressTileControl

TdxTileControlActionBarItem.Glyph
Specifies the action bar item’s image.
TdxTileControlTitle.Glyph
Specifies the title’s glyph.

ExpressWizardControl

TdxWizardControlCustomButton.Glyph
Specifies the button image.
TdxWizardControlCustomButtonCollectionItem.Glyph
Specifies the button image.
TdxWizardControlHeader.Glyph
Specifies the header image.
TdxWizardControlTitle.Glyph
Specifies the wizard title image.
Footnotes
  1. The TcxImage editor supports EXIF image rotation when used as a standalone editor or as an in-place editor in Data Grid, Tree List, Vertical Grid, and Pivot Grid controls.

See Also