Xbasic

BITMAP_SATURATION Function

Syntax

V BITMAP_SATURATION(C bitmap_name,N XPos,N YPos[,C transparent[,N saturation[,C tint[,N tint_level]]]])

Arguments

bitmap_nameCharacter

The name of the bitmap as Defined by UI_BITMAP_LOAD() or UI_BITMAP_CREATE().

XPosNumeric

The horizontal coordinate of the upper left corner of the image.

YPosNumeric

The vertical coordinate of the upper left corner of the image.

transparent

The name of the color that should be treated as transparent.

saturationNumeric

The values range from 0 to 255. 0 = Means no-color. 255 = Means full-color

tint

 

tint_levelNumeric

 

Description

The BITMAP_SATURATION() function converts a color image to gray scale, with color saturation adjusted.

Example

ui_bitmap_load("soft", file.to_blob("C:\an_image.bmp"))
ui_bitmap_create("temp", 6, 1)
ui_bitmap_draw("temp",<<%code%
set_brush("Win3d")
inner_rect(0,0,6,1)
bitmap("soft",0,0)
width = 0.25
for i = 1 to 20

bitmap_saturation("soft", width * (20-i), 0, "", i * 10)
next
bitmap_saturation("soft", width * 20, 0, "")
%code%)
ui_dlg_box("", "{image=temp}")

Limitations

Used only in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also