LevelsParams type

The parameters of a Levels effect: the highlight, midtone and shadow levels.

The type mirrors the GDI+ LevelsParams structure. A Levels takes it in its constructor and in its Parameters property.

Fields

Field Type Meaning
highight Long The highlight level, from 0 to 100. 100 leaves the top of the range alone.
midtone Long The midtone adjustment, from -100 to 100. 0 changes nothing.
shadow Long The shadow level, from 0 to 100. 0 leaves the bottom of the range alone. It has to be lower than the highlight level.

Note 0.9.45.0

The first field is named highight, with the letter l missing, and the field highlight does not exist. The argument of the function LevelsParams is spelled correctly.

Creating

Syntax: params = LevelsParams( highlight, midtone, shadow )

highlight, midtone, shadow
required Long values for the fields. highlight goes into highight.
Dim user As GdiPlusUser = GdiPlusUser()

Dim p As LevelsParams = LevelsParams(90, 10, 5)
Debug.Print p.highight & " " & p.midtone & " " & p.shadow

Dim fx As Levels = Levels()
fx.Parameters = p
Debug.Print fx.LastResult
' Output:
' 90 10 5
' 0

See Also