SetColor Method

Sets the foreground and background drawing colors.


Object.SetColor(tfr, tfg, tfb[, tbr, tbg, tbb])

Watermark.SetColor(tiFGC [, tiBGC]])
XFRX 24.0
Object.SetColor(tfr, tfg, tfb, tfa [, tbr, tbg, tbb, tba])

Watermark.SetColor(tiFGCA [, tiBGCA]])

Parameters

tfr, tfg, tfb, tfa
  Red, green, blue and alpha components of the foreground color

tbr, tbg, tbb, tba
  Red, green, blue and alpha components of the background color (optional)

tiFGC
  Foreground color. Default value is 0.

tiBGC
  Background color. Default value is -1 (transparent).

tiFGCA
  Foreground color with alpha. Default value is 0.

tiBGCA
  Background color with alpha. Default value is -1 (transparent).

Alpha component was added in XFRX 24.0.

Remarks

Applies To: XFRX#DRAW, XFRX#XML, XFRX#WATERMARK, WATERMARK-Text Object, PDFL#INIT

Examples

* after calls  loSession.SetParams()
m.loWM=EVALUATE([xfrx("XFRX#WATERMARK", m.loSession)])
m.loWM.SetText("W A T E R M A R K")
m.loWM.SetColor(255, 0, 0)
Forecolor with alpha
* after calls  loSession.SetParams()
m.loWM=EVALUATE([xfrx("XFRX#WATERMARK", m.loSession)])
m.loWM.SetText("W A T E R M A R K")
m.loWM.SetColor(255, 0, 0, 128)
Forecolor with alpha and background color with alpha
* after calls  loSession.SetParams()
m.loWM=EVALUATE([xfrx("XFRX#WATERMARK", m.loSession)])
m.loWM.SetText("W A T E R M A R K")
m.loWM.SetColor(255, 0, 0, 128, 255, 255, 255, 128)
Forecolor with alpha and background color with alpha
* after calls  loSession.SetParams()
m.loWM=EVALUATE([xfrx("XFRX#WATERMARK", m.loSession)])
m.loWM.SetText("W A T E R M A R K")
m.loWM.SetColor(RGB(255, 0, 0)+128*0x1000000, BITOR(RGB(255, 255, 255), BITLSHIFT(128, 24)))