Merge branch 'next' of https://github.com/openfl/lime into text-harfbuzz
Conflicts: lime/graphics/Font.hx project/include/graphics/Font.h project/src/ExternalInterface.cpp project/src/graphics/Font.cpp
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef LIME_MEDIA_AUDIO_BUFFER_H
|
||||
#define LIME_MEDIA_AUDIO_BUFFER_H
|
||||
#ifndef LIME_AUDIO_AUDIO_BUFFER_H
|
||||
#define LIME_AUDIO_AUDIO_BUFFER_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef LIME_MEDIA_FORMAT_OGG_H
|
||||
#define LIME_MEDIA_FORMAT_OGG_H
|
||||
#ifndef LIME_AUDIO_FORMAT_OGG_H
|
||||
#define LIME_AUDIO_FORMAT_OGG_H
|
||||
|
||||
|
||||
#include <media/AudioBuffer.h>
|
||||
#include <audio/AudioBuffer.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef LIME_MEDIA_FORMAT_WAV_H
|
||||
#define LIME_MEDIA_FORMAT_WAV_H
|
||||
#ifndef LIME_AUDIO_FORMAT_WAV_H
|
||||
#define LIME_AUDIO_FORMAT_WAV_H
|
||||
|
||||
|
||||
#include <media/AudioBuffer.h>
|
||||
#include <audio/AudioBuffer.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <list>
|
||||
#include <graphics/ImageBuffer.h>
|
||||
|
||||
#ifdef LIME_FREETYPE
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#endif
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -22,20 +26,24 @@ namespace lime {
|
||||
FT_Pos height;
|
||||
|
||||
} GlyphInfo;
|
||||
|
||||
|
||||
|
||||
|
||||
class Font {
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Font (const char *fontFace);
|
||||
void LoadGlyphs (const char *glyphs);
|
||||
void LoadRange (unsigned long start, unsigned long end);
|
||||
void SetSize (size_t size);
|
||||
value RenderToImage (Image *image);
|
||||
value RenderToImage (ImageBuffer *image);
|
||||
|
||||
#ifdef LIME_FREETYPE
|
||||
FT_Face face;
|
||||
#else
|
||||
void* face;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
@@ -44,7 +52,6 @@ namespace lime {
|
||||
std::list<GlyphInfo> glyphList;
|
||||
size_t mSize;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef LIME_MEDIA_IMAGE_H
|
||||
#define LIME_MEDIA_IMAGE_H
|
||||
#ifndef LIME_GRAPHICS_IMAGE_BUFFER_H
|
||||
#define LIME_GRAPHICS_IMAGE_BUFFER_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
@@ -9,13 +9,13 @@
|
||||
namespace lime {
|
||||
|
||||
|
||||
class Image {
|
||||
class ImageBuffer {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Image ();
|
||||
~Image ();
|
||||
ImageBuffer ();
|
||||
~ImageBuffer ();
|
||||
|
||||
void Blit (const unsigned char *data, int x, int y, int width, int height);
|
||||
void Resize (int width, int height, int bpp = 4);
|
||||
26
project/include/graphics/format/JPEG.h
Normal file
26
project/include/graphics/format/JPEG.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef LIME_GRAPHICS_FORMAT_JPEG_H
|
||||
#define LIME_GRAPHICS_FORMAT_JPEG_H
|
||||
|
||||
|
||||
#include <graphics/ImageBuffer.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class JPEG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (Resource *resource, ImageBuffer *imageBuffer);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
26
project/include/graphics/format/PNG.h
Normal file
26
project/include/graphics/format/PNG.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef LIME_GRAPHICS_FORMAT_PNG_H
|
||||
#define LIME_GRAPHICS_FORMAT_PNG_H
|
||||
|
||||
|
||||
#include <graphics/ImageBuffer.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class PNG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (Resource *resource, ImageBuffer *imageBuffer);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef LIME_MEDIA_FORMAT_JPEG_H
|
||||
#define LIME_MEDIA_FORMAT_JPEG_H
|
||||
|
||||
|
||||
#include <media/Image.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class JPEG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (Resource *resource, Image *image);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef LIME_MEDIA_FORMAT_PNG_H
|
||||
#define LIME_MEDIA_FORMAT_PNG_H
|
||||
|
||||
|
||||
#include <media/Image.h>
|
||||
#include <utils/Resource.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class PNG {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static bool Decode (Resource *resource, Image *image);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user