Skip to content

XUIPictureExtensions

Description

A module containing extension methods for the Xojo Picture class.

Methods

Name Parameters Returns
ResizeToFit p As Picture, maxWidth As Integer, maxHeight As Integer, scaleMode As XUIPictureScaleModes, onlyShrink As Boolean Picture

Enumerations

XUIPictureScaleModes

The supported ways to scale a picture.

Name
ToFill
ToFit
StretchToFill

Method Descriptions

ResizeToFit(p As Picture, maxWidth As Integer, maxHeight As Integer, scaleMode As XUIPictureScaleModes, onlyShrink As Boolean) As Picture

Returns a new picture that is a resized version of p. If onlyShrink is True then we will never enlarge p.

Based on code by Sam Rowlands.