🍭Render

Box_Outline / OUTDATED

MTools.Render.Box_Outline(vectors, colors, roundings);

NameTypeDescription

vectors

table

Two vectors for the position.

colors

table

Four colors for gradients.

roundings

table

Four boolean values for rounding.

Allows you to make an outline with different colors and roundings. ! WARNING ! This method may be disabled soon due to obsolescence. New method: #modern-box Example usage:

-- Needs events.render.
MTools.Render.Box_Outline(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        color(250, 250, 250, 250), color(250, 250, 250, 250), 
        color(250, 250, 250, 250), color(250, 250, 250, 250), 
    },
    {
        false, false,
        true, true,
    }
);
-- Draws a box outline with two non-rounded corners at the top and two rounded corners at the bottom, in white.

Box_Outline_Glow

MTools.Render.Box_Outline_Glow(vectors, clr, thickness, rounding);

NameTypeDescription

vectors

table

Two vectors for the position.

clr

color

Color for glow.

thickness

number

Amount of glow.

rounding

number

The rounding of the glow.

Allows you to make a nice glow + rounded. Example usage:

-- Needs events.render.
MTools.Render.Box_Outline_Glow(
    { 
        vector(500, 500), vector(650, 520)
    },
    color(250, 250, 250, 250),
    65,
    7.5
);
-- Draws a nice glow with 7.5 pixels of rounding.

Histogram

MTools.Render.Histogram(vectors, clr, steps, round);

NameTypeDescription

vectors

table

Two vectors, first position second size.

clr

table / color

Color for the pattern. Specifying in the array will be color.

steps

table

Unlimited number of dots as numbers.

rounding

number

Rounding out the posts.

Allows you to create a histogram. Example usage:

-- Needs events.render.
MTools.Render.Histogram(
    { 
        vector(500, 500), 
        vector(80, 80) 
    }, 
    color(255, 255, 255, 255),
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Create a Histogram with one color from points 1 6 7 3 1 9 2 7.
MTools.Render.Histogram(
    { 
        vector(590, 500), 
        vector(80, 80) 
    }, 
    {
        color(0, 255, 255, 255),
        color(255, 0, 255, 255),
        color(255, 255, 0, 255),
    },
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Creates a Histogram with three repeating colors from points 1 6 7 3 1 9 2 7.

Graphic

MTools.Render.Graphic(vectors, clr, steps);

NameTypeDescription

vectors

table

Two vectors, first position second size.

clr

table / color

Color for the pattern. Specifying in the array will be color.

steps

table

Unlimited number of dots as numbers.

Allows you to create a Graphic. Example usage:

-- Needs events.render.
MTools.Render.Graphic(
    { 
        vector(500, 500), 
        vector(80, 80) 
    }, 
    color(255, 255, 255, 255),
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Create a Graphic with one color from points 1 6 7 3 1 9 2 7.
MTools.Render.Graphic(
    { 
        vector(590, 500), 
        vector(80, 80) 
    }, 
    {
        color(0, 255, 255, 255),
        color(255, 0, 255, 255),
        color(255, 255, 0, 255),
    },
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Creates a Graphic with three repeating colors from points 1 6 7 3 1 9 2 7.

Modern / Box

MTools.Modern.Box(vectors, rounding, color);

NameTypeDescription

vectors

table

Two vectors for the position.

rounding

table

Four numeric values for rounding.

color

color

Box color.

Allows you to create a box with different rounded edges. Example usage:

-- Needs events.render.
MTools.Render.Modern.Box(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        0, 3, 
        6, 9, 
    },
    color(15, 15, 15, 127)
);
-- Draws a box with rounded 0, 3, 6, 9 black with half transparency.

Modern / Box_outline

MTools.Modern.Box_Outline(vectors, rounding, color, thickness);

NameTypeDescription

vectors

table

Two vectors for the position.

rounding

table

Four numeric values for rounding.

color

color

Outline color.

thickness

number

Outline thickness.

Allows you to create an outline with different rounded edges. Example usage:

-- Needs events.render.
MTools.Render.Modern.Box_Outline(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        0, 3, 
        6, 9, 
    },
    color(255, 255, 2555, 255),
    1.25
);
-- Draws an outline with rounded 0, 3, 6, 9 white.

Last updated