C# Class Flood.GUI.Util

Misc utility functions.
Mostra file Open project: FloodProject/flood

Public Methods

Method Description
Add ( this color, System.Color other ) : System.Color
Add ( this r, Rectangle other ) : Rectangle
Ceil ( float x ) : int
Clamp ( float x, float min, float max ) : float
Clamp ( int x, int min, int max ) : int
ClampRectToRect ( Rectangle inside, Rectangle outside, bool clampSize = false ) : Rectangle
FloatRect ( float x, float y, float w, float h ) : Rectangle
HSVToColor ( float h, float s, float v ) : System.Color
Multiply ( this color, float amount ) : System.Color
Round ( float x ) : int
SplitAndKeep ( String text, String separators ) : String[]

Splits a string but keeps the separators intact (at the end of split parts).

Subtract ( this color, System.Color other ) : System.Color
ToHSV ( this color ) : HSV

Method Details

Add() public static method

public static Add ( this color, System.Color other ) : System.Color
color this
other System.Color
return System.Color

Add() public static method

public static Add ( this r, Rectangle other ) : Rectangle
r this
other Rectangle
return Rectangle

Ceil() public static method

public static Ceil ( float x ) : int
x float
return int

Clamp() public static method

public static Clamp ( float x, float min, float max ) : float
x float
min float
max float
return float

Clamp() public static method

public static Clamp ( int x, int min, int max ) : int
x int
min int
max int
return int

ClampRectToRect() public static method

public static ClampRectToRect ( Rectangle inside, Rectangle outside, bool clampSize = false ) : Rectangle
inside Rectangle
outside Rectangle
clampSize bool
return Rectangle

FloatRect() public static method

public static FloatRect ( float x, float y, float w, float h ) : Rectangle
x float
y float
w float
h float
return Rectangle

HSVToColor() public static method

public static HSVToColor ( float h, float s, float v ) : System.Color
h float
s float
v float
return System.Color

Multiply() public static method

public static Multiply ( this color, float amount ) : System.Color
color this
amount float
return System.Color

Round() public static method

public static Round ( float x ) : int
x float
return int

SplitAndKeep() public static method

Splits a string but keeps the separators intact (at the end of split parts).
public static SplitAndKeep ( String text, String separators ) : String[]
text String String to split.
separators String Separator characters.
return String[]

Subtract() public static method

public static Subtract ( this color, System.Color other ) : System.Color
color this
other System.Color
return System.Color

ToHSV() public static method

public static ToHSV ( this color ) : HSV
color this
return HSV