Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CGShadingCreateAxialMBS(colorspace as CGColorSpaceMBS, startPoint as CGPointMBS, endPoint as CGPointMBS, func as CGFunctionMBS, extendStart as boolean, extendEnd as boolean) as CGShadingMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method CoreGraphics MBS MacCG Plugin 6.2 Yes No No Yes, macOS only No
Function: Creates a Quartz axial shading.
Notes:
Parameters:

colorspace: The color space in which color values are expressed. Quartz retains this object; upon return, you may safely release it.
startPoint: The starting point of the axis, in the shading's target coordinate space.
endPoint: The ending point of the axis, in the shading's target coordinate space.
function: A CGFunction object. This object refers to your function for creating an axial shading. Quartz retains this object; upon return, you may safely release it.
extendStart: A Boolean value that specifies whether to extend the shading beyond the starting point of the axis.
extendEnd: A Boolean value that specifies whether to extend the shading beyond the ending point of the axis.

Returns a new Quartz axial shading or nil on any error.

Discussion
An axial shading is a color blend that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis. When you are ready to draw the shading, call the function CGContextMBS.DrawShading.

Available in Mac OS X version 10.2 and later.

Some examples using this method:

Feedback, Comments & Corrections

CGShadingCreateRadialMBS(colorspace as CGColorSpaceMBS, startPoint as CGPointMBS, startRadius as Double, endPoint as CGPointMBS, endRadius as Double, func as CGFunctionMBS, extendStart as boolean, extendEnd as boolean) as CGShadingMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method CoreGraphics MBS MacCG Plugin 6.2 Yes No No Yes, macOS only No
Function: Creates a Quartz radial shading.
Notes:
Parameters
colorspace: The color space in which color values are expressed.
startPoint: The center of the starting circle, in the shading's target coordinate space.
startRadius: The radius of the starting circle, in the shading's target coordinate space.
endPoint: The center of the ending circle, in the shading's target coordinate space.
endRadius: The radius of the ending circle, in the shading's target coordinate space.
function: A CGFunction object. This object refers to your function for creating a radial shading.
extendStart: A Boolean value that specifies whether to extend the shading beyond the starting circle.
extendEnd: A Boolean value that specifies whether to extend the shading beyond the ending circle.

Returns a new Quartz radial shading or nil on any error.

A radial shading is a color blend that varies between two circles. To draw the shading, call the function CGContextDrawShading.

Available in Mac OS X version 10.2 and later.

Some examples using this method:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacCG Plugin.




Links
MBS Xojo PDF Plugins