You've already forked godot
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:
8
thirdparty/msdfgen/core/BitmapRef.hpp
vendored
8
thirdparty/msdfgen/core/BitmapRef.hpp
vendored
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user