Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSFMXSVG > FMX.RS.SVGUtils > Routines

ParseAspectRatio(String,TSVGPreserveAspectRatio) Method

Scroll Prev Top Next More

Parses the input string and sets the Aspect Ratio properties

Namespace: FMX.RS.SVGUtils

Parameters

S

Type: String

[defer][<align>] [<meetOrSlice>]

AspectRatio

Type: TSVGPreserveAspectRatio

The <meetOrSlice> parameter is optional and, if provided, is separated from the <align> value by one or more spaces and then must be one of the following strings:

meet (the default) - Scale the graphic such that:

aspect ratio is preserved

the entire  ‘viewBox’ is visible within the viewport

the  ‘viewBox’ is scaled up as much as possible, while still meeting the other criteria

In this case, if the aspect ratio of the graphic does not match the viewport, some of the viewport will extend beyond the bounds of the  ‘viewBox’ (i.e., the area into which the  ‘viewBox’ will draw will be smaller than the viewport).

slice - Scale the graphic such that:

aspect ratio is preserved

the entire viewport is covered by the  ‘viewBox’

the  ‘viewBox’ is scaled down as much as possible, while still meeting the other criteria

In this case, if the aspect ratio of the  ‘viewBox’ does not match the viewport, some of the  ‘viewBox’ will extend beyond the bounds of the viewport (i.e., the area into which the  ‘viewBox’ will draw is larger than the viewport).

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb