class org.aswing.StyleTune

The style tune include factors to generate colors for gradient content and border, and include the round property and shaow alpha property.

This is used to affect the component's UI style.

Instance Fields

var bGradient:Float

Gradient brightness range of border color [-1, 1]

var bOffset:Float

The birightness offset for border color [-1, 1]

var cGradient:Float

Gradient brightness range of content color [-1, 1]

var round:Float

The round rect radius, 0 means not round [0, +]

var shadowAlpha:Float

Shadow alpha value [0, 1]

function new(?cg:Float = 0.2f, ?bo:Float = 0.15f, ?bg:Float = 0.35f, ?sa:Float = 0.2f, ?r:Float = 0, ?ma:StyleTune = null): Void

Create a UIColorAdjuster with specified params

cg

gradient brightness range of content color

bo

birightness offset for border color

bg

gradient brightness range of border color

sa

shadow alpha

r

the round rect radius, 0 means not round

ma

the adjuster for mideground color, null means use this(UIColorAdjuster)

function changeRound(newRound:Float): StyleTune

function clone(): StyleTune

function getBDark(c:ASColor): ASColor

Returns the border dark color

function getBLight(c:ASColor): ASColor

Returns the border light color

function getCDark(c:ASColor): ASColor

Returns the content dark color

function getCLight(c:ASColor): ASColor

Returns the content light color

function getRound(): Float

Returns the round rect radius, 0 means not round

function getShadowAlpha(): Float

Returns the shadow alpha value

function get_mide(): StyleTune

function set_mide(adjuster:StyleTune): StyleTune

function sharpen(factor:Float): StyleTune

A factor bigger than 1 make it sharper, smaller than 1 make it flattener. factor 0 make it most flatten, all same color. This method just affect the colors.

factor

the sharpen/flatten factor

returns

a new StyleTune sharpened/flattened

function toString(): String