TdxSmartGlyph.SourceDPI Property
Specifies the target monitor DPI for the stored glyph.
Declaration
property SourceDPI: Integer read; write;
Property Value
Type | Description |
---|---|
Integer | The image container’s target monitor DPI. The property value must be within the range between dxMinDPI and dxMaxDPI global constant values. |
Remarks
You can use the SourceDPI
property to specify the base DPI value for the Smart Glyph container. The container multiplies the stored image’s width and height by the ratio between the monitor DPI and the SourceDPI
property to calculate the image’s on-screen pixel dimensions.
Code Example
The following code example overrides the TdxForm.ScaleFactorChanged procedure to disable the built-in scaling mechanism for UI element glyphs:
type
TMyForm = class(TdxForm)
FSmartGlyphContainer: TdxSmartGlyph;
//...
procedure ScaleFactorChanged(M, D: Integer); override;
//...
end;
//...
procedure TMyForm.ScaleFactorChanged(M, D: Integer);
begin
FSmartGlyphContainer.SourceDPI := Self.ScaleFactor.Apply(dxDefaultDPI);
end;
Default Value
The SourceDPI
property’s default value is the dxDefaultDPI global constant.
See Also