Reference for .Net version of SpaceVIL
0.3.5.8
SpaceVIL (Space of Visual Items Layout) is a cross-platform and multilingual framework for creating GUI client applications for .NET Standard, .NET Core and JVM. SpaceVIL is based on OpenGL graphic technology and GLFW. Using this framework in conjunction with .Net Core or with a JVM, you can work and create graphical client applications on Linux, Mac OS X and Windows.
|
GraphicsMathService is a static class with static methods for working with colors, fonts, shapes and images. More...
Static Public Member Functions | |
static Color | MixColors (params Color[] colors) |
Mixing two or more colors into one. More... | |
static Color | CloneColor (Color color) |
Getting clone of the specified color. More... | |
static List< float[]> | GetRectangle (float w=100, float h=100, float x=0, float y=0) |
Making a rectangle as two triangles by its width, height and top left corner position (x, y). More... | |
static List< float[]> | GetRoundSquare (CornerRadius cornerRadius, float width=100, float height=100, int x=0, int y=0) |
Making a rectangle with roundness corners. More... | |
static List< float[]> | GetRoundSquare (float width=100, float height=100, float radius=0.0f, int x=0, int y=0) |
Making a rectangle with roundness corners. More... | |
static List< float[]> | GetStar (float R=100, float r=50, int n=5) |
Making a star figure with specified outer radius, inner radius and number of points. More... | |
static List< float[]> | GetRegularPolygon (float r=100, int n=6) |
Making a regular polygon with specified radius and number of edges. More... | |
static List< float[]> | GetEllipse (float r=100, int n=32) |
Making an ellipse with two equal radii (i. e. circle). More... | |
static List< float[]> | GetEllipse (float w, float h, int x=0, int y=0, int n=32) |
Making an ellipse. More... | |
static List< float[]> | GetTriangle (float w=100, float h=100, int x=0, int y=0, int angle=0) |
Making a triangle with corners in (x + w/2, y), (x, y + h), (x + w, y + h), rotated on angle degrees. More... | |
static List< float[]> | GetCross (float w, float h, float thickness, int alpha) |
Making cross shape with specified width, height, thickness and rotation angle. More... | |
static List< float[]> | RotateShape (float w, float h, float angle, List< float[]> triangles) |
Rotating the specified shape. More... | |
static List< float[]> | GetArrow (float w, float h, float thickness, int alpha) |
Making an arrow shape. More... | |
static List< float[]> | MoveShape (List< float[]> shape, float x, float y) |
Moving the specified shape by X or/and Y direction. More... | |
static List< float[]> | GetFolderIconShape (float w=20.0f, float h=15.0f, float x=0, float y=0) |
Making folder icon shape. More... | |
static List< float[]> | GetRoundSquareBorder (float width, float height, float radius, float thickness, int x, int y) |
Making a rectangle border with roundness corners. More... | |
static List< float[]> | GetRoundSquareBorder (CornerRadius cornerRadius, float width, float height, float thickness, int x, int y) |
Making a rectangle border with roundness corners. More... | |
static Bitmap | ScaleBitmap (Bitmap img, int w, int h) |
Smooth scaling the specified image by new size. More... | |
static Color | ColorTransform (int r, int g, int b) |
Making System.Drawing.Color from specified byte RGB format. More... | |
static Color | ColorTransform (int r, int g, int b, int a) |
Making System.Drawing.Color from specified byte RGBA format. More... | |
static Color | ColorTransform (float r, float g, float b) |
Making System.Drawing.Color from specified float RGB format. More... | |
static Color | ColorTransform (float r, float g, float b, float a) |
Making System.Drawing.Color from specified float RGBA format. More... | |
static Font | ChangeFontSize (int size, Font oldFont) |
Changing font size. More... | |
static Font | ChangeFontStyle (FontStyle style, Font oldFont) |
Changing font style. More... | |
static Font | ChangeFontFamily (FontFamily fontFamily, Font oldFont) |
Changing font family. More... | |
static List< float[]> | UpdateShape (List< float[]> triangles, int w, int h) |
Updating the specified shape by its new size (streching by new size). More... | |
static List< float[]> | UpdateShape (List< float[]> triangles, int w, int h, Area area, ItemAlignment alignments) |
Updating the specified shape by its new size (streching by new size). More... | |
static Area | GetFigureBounds (List< float[]> triangles) |
Getting a shape's bounds as SpaceVIL.Core.Area. More... | |
static List< float[]> | MoveShape (List< float[]> triangles, float x, float y, Area area, ItemAlignment alignments) |
Moving the specified shape relative to the specified area, specifiedalignment and specified shifts. More... | |
GraphicsMathService is a static class with static methods for working with colors, fonts, shapes and images.
|
static |
Changing font family.
fontFamily | New font family of the font. |
oldFont | Font as System.Drawing.Font. |
|
static |
Changing font size.
size | New size of the font. |
oldFont | Font as System.Drawing.Font. |
|
static |
Changing font style.
style | New style of the font. |
oldFont | Font as System.Drawing.Font. |
|
static |
Getting clone of the specified color.
color | Color for cloning as System.Drawing.Color. |
|
static |
Making System.Drawing.Color from specified float RGB format.
r | Red color component. Range: (0.0f - 1.0f) |
g | Green color component. Range: (0.0f - 1.0f) |
b | Blue color component. Range: (0.0f - 1.0f) |
|
static |
Making System.Drawing.Color from specified float RGBA format.
r | Red color component. Range: (0.0f - 1.0f) |
g | Green color component. Range: (0.0f - 1.0f) |
b | Blue color component. Range: (0.0f - 1.0f) |
a | Alpha color component. Range: (0.0f - 1.0f) |
|
static |
Making System.Drawing.Color from specified byte RGB format.
r | Red color component. Range: (0 - 255) |
g | Green color component. Range: (0 - 255) |
b | Blue color component. Range: (0 - 255) |
|
static |
Making System.Drawing.Color from specified byte RGBA format.
r | Red color component. Range: (0 - 255) |
g | Green color component. Range: (0 - 255) |
b | Blue color component. Range: (0 - 255) |
a | Alpha color component. Range: (0 - 255) |
|
static |
Making an arrow shape.
w | Arrow width. |
h | Arrow height. |
thickness | Arrow thickness. |
alpha | Rotation angle in degrees. |
|
static |
Making cross shape with specified width, height, thickness and rotation angle.
w | Cross width. |
h | Cross height. |
thickness | Cross parts thickness. |
alpha | Cross rotation angle in degrees. |
|
static |
Making an ellipse with two equal radii (i. e. circle).
r | Radius of a circle (default = 100). |
n | Points count on the ellipse border (default = 32). |
|
static |
Making an ellipse.
w | Ellipse width. |
h | Ellipse height. |
x | X position of the left top corner (ellipse center in x + w/2) (default = 0). |
y | Y position of the left top corner (ellipse center in y + h/2) (default = 0). |
n | points count on the ellipse border (default = 32). |
|
static |
Getting a shape's bounds as SpaceVIL.Core.Area.
triangles | Triangles list of the specified shape. |
|
static |
Making folder icon shape.
w | Shape width (default = 20). |
h | Shape width (default = 15). |
x | Shape X axis shift (default = 0). |
y | Shape Y axis shift (default = 0). |
|
static |
Making a rectangle as two triangles by its width, height and top left corner position (x, y).
w | Width of rectangle (default = 100). |
h | Height of rectangle (default = 100). |
x | X position of rectangle (default = 0). |
y | Y position of rectangle (default = 0). |
|
static |
Making a regular polygon with specified radius and number of edges.
r | Radius of regular polygon. |
n | Number of edges of regular polygon. |
|
static |
Making a rectangle with roundness corners.
cornerRadius | Radius values for all corners as SpaceVIL.Decorations.CornerRadius. |
width | Rectangle width (default = 100). |
height | Rectangle height (default = 100). |
x | X position (left top corner) of the result object (default = 0). |
y | Y position (left top corner) of the result object (default = 0). |
|
static |
Making a rectangle with roundness corners.
width | Rectangle width (default = 100). |
height | Rectangle height (default = 100). |
radius | Same radius value for each corner (default = 0). |
x | X position (left top corner) of the result object (default = 0). |
y | Y position (left top corner) of the result object (default = 0). |
|
static |
Making a rectangle border with roundness corners.
cornerRadius | Radius values for all corners as SpaceVIL.Decorations.CornerRadius. |
width | Rectangle border width. |
height | Rectangle border height. |
thickness | Border thickness. |
x | X position (left top corner) of the result shape. |
y | Y position (left top corner) of the result shape. |
|
static |
Making a rectangle border with roundness corners.
width | Rectangle border width. |
height | Rectangle border height. |
radius | Same radius value for each corner. |
thickness | Border thickness. |
x | X position (left top corner) of the result shape. |
y | Y position (left top corner) of the result shape. |
|
static |
Making a star figure with specified outer radius, inner radius and number of points.
R | Circumscribed circle radius (default = 100). |
r | Incircle radius (default = 50). |
n | Vertices count (default = 5). |
|
static |
Making a triangle with corners in (x + w/2, y), (x, y + h), (x + w, y + h), rotated on angle degrees.
w | Triangle width (default = 100). |
h | Triangle height (default = 100). |
x | Triangle X offset (default = 0). |
y | Triangle Y offset (default = 0). |
angle | Rotation angle for the triangle in degrees (default = 0). |
|
static |
Mixing two or more colors into one.
colors | Sequence of colors as System.Drawing.Color. |
|
static |
Moving the specified shape by X or/and Y direction.
shape | Triangles list of the specified shape. |
x | X axis shift. |
y | Y axis shift. |
|
static |
Moving the specified shape relative to the specified area, specifiedalignment and specified shifts.
triangles | Triangles list of the specified shape. |
x | X axis shift. |
y | Y axis shift. |
area | Area as SpaceVIL.Core.Area. |
alignments | Alignment as SpaceVIL.Core.ItemAlignment. |
|
static |
Rotating the specified shape.
w | Width of the shape. |
h | Height of the shape. |
angle | Rotation angle in degrees. |
triangles | Triangles list of the specified shape. |
|
static |
Smooth scaling the specified image by new size.
img | Image as System.Drawing.Bitmap. |
w | New width of the image. |
h | New height of the image. |
|
static |
Updating the specified shape by its new size (streching by new size).
triangles | Triangles list of the specified shape. |
w | New shape width. |
h | New shape height. |
|
static |
Updating the specified shape by its new size (streching by new size).
triangles | Triangles list of the specified shape. |
w | New shape width. |
h | New shape height. |
area | New shape bounds as SpaceVIL.Core.Area. |
alignments | New shape alignments as List of SpaceVIL.Core.ItemAlignment. |