renamed GenImageLinearGradient to GenImageGradientLinear
This commit is contained in:
parent
2633eb0579
commit
12d660cf8c
|
|
@ -27,9 +27,9 @@ int main(void)
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [textures] example - procedural images generation");
|
InitWindow(screenWidth, screenHeight, "raylib [textures] example - procedural images generation");
|
||||||
|
|
||||||
Image verticalGradient = GenImageLinearGradient(screenWidth, screenHeight, 0, RED, BLUE);
|
Image verticalGradient = GenImageGradientLinear(screenWidth, screenHeight, 0, RED, BLUE);
|
||||||
Image horizontalGradient = GenImageLinearGradient(screenWidth, screenHeight, 90, RED, BLUE);
|
Image horizontalGradient = GenImageGradientLinear(screenWidth, screenHeight, 90, RED, BLUE);
|
||||||
Image diagonalGradient = GenImageLinearGradient(screenWidth, screenHeight, 45, RED, BLUE);
|
Image diagonalGradient = GenImageGradientLinear(screenWidth, screenHeight, 45, RED, BLUE);
|
||||||
Image radialGradient = GenImageGradientRadial(screenWidth, screenHeight, 0.0f, WHITE, BLACK);
|
Image radialGradient = GenImageGradientRadial(screenWidth, screenHeight, 0.0f, WHITE, BLACK);
|
||||||
Image checked = GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE);
|
Image checked = GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE);
|
||||||
Image whiteNoise = GenImageWhiteNoise(screenWidth, screenHeight, 0.5f);
|
Image whiteNoise = GenImageWhiteNoise(screenWidth, screenHeight, 0.5f);
|
||||||
|
|
|
||||||
|
|
@ -6241,7 +6241,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GenImageLinearGradient",
|
"name": "GenImageGradientLinear",
|
||||||
"description": "Generate image: linear gradient",
|
"description": "Generate image: linear gradient",
|
||||||
"returnType": "Image",
|
"returnType": "Image",
|
||||||
"params": [
|
"params": [
|
||||||
|
|
|
||||||
|
|
@ -4996,7 +4996,7 @@ return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "GenImageLinearGradient",
|
name = "GenImageGradientLinear",
|
||||||
description = "Generate image: linear gradient",
|
description = "Generate image: linear gradient",
|
||||||
returnType = "Image",
|
returnType = "Image",
|
||||||
params = {
|
params = {
|
||||||
|
|
|
||||||
|
|
@ -2416,8 +2416,8 @@ Function 245: GenImageColor() (3 input parameters)
|
||||||
Param[1]: width (type: int)
|
Param[1]: width (type: int)
|
||||||
Param[2]: height (type: int)
|
Param[2]: height (type: int)
|
||||||
Param[3]: color (type: Color)
|
Param[3]: color (type: Color)
|
||||||
Function 246: GenImageLinearGradient() (5 input parameters)
|
Function 246: GenImageGradientLinear() (5 input parameters)
|
||||||
Name: GenImageLinearGradient
|
Name: GenImageGradientLinear
|
||||||
Return type: Image
|
Return type: Image
|
||||||
Description: Generate image: linear gradient
|
Description: Generate image: linear gradient
|
||||||
Param[1]: width (type: int)
|
Param[1]: width (type: int)
|
||||||
|
|
|
||||||
|
|
@ -1549,7 +1549,7 @@
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GenImageLinearGradient" retType="Image" paramCount="5" desc="Generate image: linear gradient">
|
<Function name="GenImageGradientLinear" retType="Image" paramCount="5" desc="Generate image: linear gradient">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
<Param type="int" name="direction" desc="" />
|
<Param type="int" name="direction" desc="" />
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ ImageColorContrast|void|(Image *image, float contrast);|
|
||||||
ImageColorBrightness|void|(Image *image, int brightness);|
|
ImageColorBrightness|void|(Image *image, int brightness);|
|
||||||
ImageColorReplace|void|(Image *image, Color color, Color replace);|
|
ImageColorReplace|void|(Image *image, Color color, Color replace);|
|
||||||
GenImageColor|Image|(int width, int height, Color color);|
|
GenImageColor|Image|(int width, int height, Color color);|
|
||||||
GenImageLinearGradient|Image|(int width, int height, int direction, Color start, Color end);|
|
GenImageGradientLinear|Image|(int width, int height, int direction, Color start, Color end);|
|
||||||
GenImageGradientRadial|Image|(int width, int height, float density, Color inner, Color outer);|
|
GenImageGradientRadial|Image|(int width, int height, float density, Color inner, Color outer);|
|
||||||
GenImageChecked|Image|(int width, int height, int checksX, int checksY, Color col1, Color col2);|
|
GenImageChecked|Image|(int width, int height, int checksX, int checksY, Color col1, Color col2);|
|
||||||
GenImageWhiteNoise|Image|(int width, int height, float factor);|
|
GenImageWhiteNoise|Image|(int width, int height, float factor);|
|
||||||
|
|
|
||||||
|
|
@ -1378,7 +1378,7 @@
|
||||||
<Param name="Color color" />
|
<Param name="Color color" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="GenImageLinearGradient" func="yes">
|
<KeyWord name="GenImageGradientLinear" func="yes">
|
||||||
<Overload retVal="Image" descr="Generate image: linear gradient">
|
<Overload retVal="Image" descr="Generate image: linear gradient">
|
||||||
<Param name="int width" />
|
<Param name="int width" />
|
||||||
<Param name="int height" />
|
<Param name="int height" />
|
||||||
|
|
|
||||||
|
|
@ -317,7 +317,7 @@ RLAPI bool ExportImageAsCode(Image image, const char *fileName);
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||||
RLAPI Image GenImageLinearGradient(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient
|
RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient
|
||||||
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||||
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||||
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||||
|
|
|
||||||
|
|
@ -1239,7 +1239,7 @@ RLAPI bool ExportImageAsCode(Image image, const char *fileName);
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||||
RLAPI Image GenImageLinearGradient(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient
|
RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient
|
||||||
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||||
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||||
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||||
|
|
|
||||||
|
|
@ -685,7 +685,10 @@ Image GenImageColor(int width, int height, Color color)
|
||||||
|
|
||||||
#if defined(SUPPORT_IMAGE_GENERATION)
|
#if defined(SUPPORT_IMAGE_GENERATION)
|
||||||
// Generate image: linear gradient
|
// Generate image: linear gradient
|
||||||
Image GenImageLinearGradient(int width, int height, int direction, Color start, Color end)
|
// The direction value specifies the direction of the gradient (in degrees)
|
||||||
|
// with 0 being vertical (from top to bottom), 90 being horizontal (from left to right).
|
||||||
|
// The gradient effectively rotates counter-clockwise by the specified amount.
|
||||||
|
Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end)
|
||||||
{
|
{
|
||||||
Color *pixels = (Color *)RL_MALLOC(width*height*sizeof(Color));
|
Color *pixels = (Color *)RL_MALLOC(width*height*sizeof(Color));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user