diff options
| author | Ray San <[email protected]> | 2018-05-04 16:25:31 +0200 |
|---|---|---|
| committer | Ray San <[email protected]> | 2018-05-04 16:25:31 +0200 |
| commit | 6324697ffd7fd410274599457dd9f85119510898 (patch) | |
| tree | fcba2d763973fcc59ecc77ef425c9735fb409050 /src/raylib.h | |
| parent | 9d103b7c2faeb11d1dded450b138a590d476b0cf (diff) | |
| download | raylib-6324697ffd7fd410274599457dd9f85119510898.tar.gz raylib-6324697ffd7fd410274599457dd9f85119510898.zip | |
Rectangle parameters changed to float
- Some examples tweaks
- Reviewed ImageFormat()
- Use float for text fontSize
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/raylib.h b/src/raylib.h index 7afb9fe1..6d3aaaf9 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -349,10 +349,10 @@ typedef struct Color { // Rectangle type typedef struct Rectangle { - int x; - int y; - int width; - int height; + float x; + float y; + float width; + float height; } Rectangle; // Image type, bpp always RGBA (32bit) @@ -915,11 +915,11 @@ RLAPI void ImageResizeNN(Image *image,int newWidth,int newHeight); RLAPI void ImageMipmaps(Image *image); // Generate all mipmap levels for a provided image RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font) -RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) +RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawRectangle(Image *dst, Vector2 position, Rectangle rec, Color color); // Draw rectangle within an image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, float spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -964,11 +964,11 @@ RLAPI void UnloadSpriteFont(SpriteFont font); // Text drawing functions RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) -RLAPI void DrawTextEx(SpriteFont font, const char* text, Vector2 position, float fontSize, int spacing, Color tint); // Draw text using SpriteFont and additional parameters +RLAPI void DrawTextEx(SpriteFont font, const char* text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using SpriteFont and additional parameters // Text misc. functions RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font -RLAPI Vector2 MeasureTextEx(SpriteFont font, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont +RLAPI Vector2 MeasureTextEx(SpriteFont font, const char *text, float fontSize, float spacing); // Measure string size for SpriteFont RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string RLAPI int GetGlyphIndex(SpriteFont font, int character); // Returns index position for a unicode character on sprite font |
