imageSetDrawingTransparency

Specifies the degree of transparency of drawing functions.

imageSetDrawingTransparency(name, percent) → returns void

Member Function Syntax

someImage.setDrawingTransparency(percent)

Argument Reference

name string
Required

The image on which this operation is performed.

percent numeric
Required

Percent of transparency, a floating point number in range 0-100

Examples
Sample code invoking the imageSetDrawingTransparency function

CF 11+ Create a new image. With the new image write transparent text

TextCharacteristics = { size="20", style="bold", strikethrough="false", underline="false"};
imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.setDrawingTransparency(50);
imgObj.drawText("CFDocs",20,50,TextCharacteristics);
cfimage(action="writeToBrowser", source=imgObj);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub