1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Update ICU and msdfgen.

This commit is contained in:
bruvzg
2024-03-12 10:26:55 +02:00
parent 22c20cea6e
commit 0d02568ff8
53 changed files with 421 additions and 396 deletions

View File

@@ -1,12 +1,10 @@
#pragma once
#include <cstdlib>
#include "base.h"
namespace msdfgen {
typedef unsigned char byte;
/// Reference to a 2D image bitmap or a buffer acting as one. Pixel storage not owned or managed by the object.
template <typename T, int N = 1>
struct BitmapRef {
@@ -17,7 +15,7 @@ struct BitmapRef {
inline BitmapRef() : pixels(NULL), width(0), height(0) { }
inline BitmapRef(T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
inline T * operator()(int x, int y) const {
inline T *operator()(int x, int y) const {
return pixels+N*(width*y+x);
}
@@ -34,7 +32,7 @@ struct BitmapConstRef {
inline BitmapConstRef(const T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
inline BitmapConstRef(const BitmapRef<T, N> &orig) : pixels(orig.pixels), width(orig.width), height(orig.height) { }
inline const T * operator()(int x, int y) const {
inline const T *operator()(int x, int y) const {
return pixels+N*(width*y+x);
}