Kaynağa Gözat

* started implementatin of c++ header and example

master
Bergmann89 10 yıl önce
ebeveyn
işleme
80e534d16b
12 değiştirilmiş dosya ile 1338 ekleme ve 48 silme
  1. +169
    -0
      header/examples/cpp/example.cpp
  2. +10
    -0
      header/examples/cpp/example.h
  3. +11
    -0
      header/examples/cpp/helper.h
  4. +159
    -0
      header/examples/cpp/main.cpp
  5. +2
    -2
      header/libTextSuite.h
  6. +941
    -0
      header/libTextSuite.hpp
  7. +1
    -1
      header/ulibTextSuite.pas
  8. +4
    -4
      ultsChar.pas
  9. +4
    -4
      ultsContext.pas
  10. +8
    -8
      ultsFont.pas
  11. +6
    -6
      ultsImage.pas
  12. +23
    -23
      ultsTextBlock.pas

+ 169
- 0
header/examples/cpp/example.cpp Dosyayı Görüntüle

@@ -0,0 +1,169 @@
#include <stdio.h>
#include <GL/gl.h>

#include "example.h"
#include "helper.h"
#include "..\..\libTextSuite.hpp"

#if _WIN64
# define LIB_NAME "..\\..\\..\\libTextSuite-x86_64-win64.dll"
#elif _WIN32
# define LIB_NAME "..\\..\\..\\libTextSuite-i386-win32.dll"
#elif __linux__ && (__amd64 || __x86_64 || _M_AMD64 || __ppc64__)
# define LIB_NAME "../../../libTextSuite-x86_64-linux.so"
#elif __linux__ && (__i386 || _X86_)
# define LIB_NAME "../../../libTextSuite-i386-linux.so"
#else
# error 'unknown operation system'
#endif
/*
lts_context_handle_t context;
lts_font_creator_handle_t creator;
lts_renderer_handle_t renderer;
lts_font_handle_t font;
lts_post_processor_handle_t pp;
lts_post_processor_handle_t ppFillPattern;
lts_post_processor_handle_t ppFillColor;
lts_post_processor_handle_t ppBorder;

const char* TEST_TEXT = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
const wchar_t CHAR_RANGE_LOREM[] = { 'L', 'o', 'r', 'e', 'm', 0 };
const wchar_t CHAR_RANGE_E[] = { 'e', 0 };

const uint8_t PATTER_DATA[] = {
0xFF, 0xBF, 0x7F, 0xBF,
0xBF, 0xFF, 0xBF, 0x7F,
0x7F, 0xBF, 0xFF, 0xBF,
0xBF, 0x7F, 0xBF, 0xFF
};

void WINAPI execute_post_proc(lts_char_handle_t charHandle, lts_image_handle_t imageHandle)
{
lts_post_processor_execute(ppFillPattern, charHandle, imageHandle);
lts_post_processor_execute(ppFillColor, charHandle, imageHandle);
lts_post_processor_execute(ppBorder, charHandle, imageHandle);
}
*/
bool exampleInit()
{/*
if (lts_initialize(LIB_NAME) != ltsErrNone)
{
showMessage("unable to initialize library");
return false;
}
context = lts_context_create();
if (!context)
{
showMessage("unable to create text suite context");
return false;
}
renderer = lts_renderer_create(context, ltsRendererOpenGL, ltsFormatRGBA8);
if (!renderer)
{
showMessage("unable to create text suite renderer");
return false;
}
creator = lts_font_creator_create(context, ltsFontCreatorGDI);
if (!creator)
{
showMessage("unable to create text suite creator");
return false;
}
lts_post_processor_custom_data_t ppData;
ppData.args = NULL;
ppData.execute = &execute_post_proc;
pp = lts_post_processor_custom_create(context, &ppData);
if (!pp)
{
showMessage("unable to create custom post processor");
return false;
}
lts_image_handle_t img = lts_image_create(context);
lts_image_create_empty(img, ltsFormatAlpha8, 4, 4);
void* imgData = lts_image_get_data(img);
if (img) memcpy(imgData, &PATTER_DATA[0], 16);
ppFillPattern = lts_post_processor_fill_pattern_create(context, img, true, ltsPosition(0, 0), LTS_IMAGE_MODES_MODULATE_ALL, LTS_COLOR_CHANNELS_RGBA);
lts_post_processor_add_chars(ppFillPattern, ltsUsageInclude, &CHAR_RANGE_LOREM[0]);
ppFillColor = lts_post_processor_fill_color_create(context, ltsColor4f(0.0, 0.0, 0.5, 1.0), LTS_IMAGE_MODES_REPLACE_ALL, LTS_COLOR_CHANNELS_RGB);
lts_post_processor_add_chars(ppFillColor, ltsUsageExclude, &CHAR_RANGE_E[0]);
ppBorder = lts_post_processor_border_create(context, 3.0, 0.5, ltsColor4f(0.0, 0.5, 0.0, 1.0), true);
lts_post_processor_add_chars(ppBorder, ltsUsageInclude, &CHAR_RANGE_E[0]);
font = lts_font_creator_get_font_by_file(creator, "../Prototype.ttf", 40, 0, ltsAANormal);
if (!font)
{
showMessage("unable to create text suite font");
return false;
}
if (lts_font_set_post_processor(font, pp) != ltsErrNone)
{
showMessage("unable to set post processor");
return false;
}
return true;*/
}

bool exampleRender(int width, int height)
{/*
const lts_color4f_t color = { 1.0, 1.0, 1.0, 1.0 };
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
lts_block_flags_t flags = 0;
FLAGS_SET(flags, ltsBlockFlagWordWrap);
lts_text_block_handle_t textBlock = lts_renderer_begin_block(renderer, 10, 10, width-20, height-20, flags);
if (!textBlock)
{
showMessage(lts_get_last_error_msg());
return false;
}
if (lts_text_block_set_horz_align(textBlock, ltsHorzAlignJustify) != ltsErrNone)
{
showMessage("unable to set horizontal alignment");
return false;
}
if (lts_text_block_set_font(textBlock, font) != ltsErrNone)
{
showMessage("unable to set font");
return false;
}
if (lts_text_block_set_color(textBlock, color) != ltsErrNone)
{
showMessage("unable to set font");
return false;
}
if (lts_text_block_text_out_a(textBlock, TEST_TEXT) != ltsErrNone)
{
showMessage("unable to print text");
return false;
}
if (lts_renderer_end_block(renderer, textBlock) != ltsErrNone)
{
showMessage("unable to finish text block");
return false;
}
//lts_text_block_destroy(textBlock);
glDisable(GL_BLEND);
return true;*/
}

void exampleFinish()
{/*
lts_font_destroy(font);
lts_post_processor_destroy(ppBorder);
lts_post_processor_destroy(ppFillColor);
lts_post_processor_destroy(ppFillPattern);
lts_post_processor_destroy(pp);
lts_font_creator_destroy(creator);
lts_renderer_destroy(creator);
lts_context_destroy(context);
lts_finalize();*/
}

+ 10
- 0
header/examples/cpp/example.h Dosyayı Görüntüle

@@ -0,0 +1,10 @@
#ifndef EXAMPLE_H
#define EXAMPLE_H

#include <stdbool.h>

bool exampleInit();
bool exampleRender(int width, int height);
void exampleFinish();

#endif /* EXAMPLE_H */

+ 11
- 0
header/examples/cpp/helper.h Dosyayı Görüntüle

@@ -0,0 +1,11 @@
#ifndef HELPER_H
#define HELPER_H

#include <windows.h>

extern HWND hwnd;

inline void showMessage(const char* msg)
{ MessageBox(hwnd, msg, "TextSuiteExample Error", MB_OK); };

#endif /* HELPER_H */

+ 159
- 0
header/examples/cpp/main.cpp Dosyayı Görüntüle

@@ -0,0 +1,159 @@
#include <windows.h>
#include <Wingdi.h>
#include <GL/gl.h>

#include "example.h"

const char g_szClassName[] = "OpenGLWindowClass";

HDC hdc;
HGLRC hglrc;
HWND hwnd;
int done = 0;

int screenw, screenh;

void SysShutdown (void)
{
done = 1;
exampleFinish();
wglMakeCurrent(hdc, NULL);
wglDeleteContext(hglrc);
PostQuitMessage(0);
}

void setPixelFormat()
{
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
32,
0,0,0,0,0,0,0,0,0,0,0,0,0, // useles parameters
16,
0,0,0,0,0,0,0
};
int indexPixelFormat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, indexPixelFormat, &pfd);
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CREATE:
if ((hdc = GetDC(hwnd)) == NULL) // get device context
{
MessageBox(hwnd, "Failed to Get the Window Device Context", "Device Context Error", MB_OK);
SysShutdown();
break;
}
setPixelFormat();
if ((hglrc = wglCreateContext(hdc)) == NULL)
{
MessageBox(hwnd, "Failed to Create the OpenGL Rendering Context", "OpenGL Rendering Context Error", MB_OK);
SysShutdown();
break;
}
if (!wglMakeCurrent(hdc, hglrc))
{
MessageBox(hwnd, "Failed to make OpenGL Rendering Context current", "OpenGL Rendering Context Error", MB_OK);
SysShutdown();
break;
}
glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
if (!exampleInit())
{
SysShutdown();
break;
}
break;
case WM_SIZE:
screenw = LOWORD(lParam);
screenh = HIWORD(lParam);
break;
case WM_PAINT:
glClearColor(1.0, 1.0, 1.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, screenw, screenh);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, screenw, screenh, 0, -10, 10);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
if (!exampleRender(screenw, screenh))
SysShutdown();
SwapBuffers(hdc);
break;
case WM_CLOSE:
SysShutdown();
DestroyWindow(hwnd);
break;
case WM_DESTROY:
SysShutdown();
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
MSG Msg;

wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

if(!RegisterClassEx(&wc))
{
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}

if ((hwnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName,
"TextSuiteExample",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 640, 480,
NULL, NULL, hInstance, NULL)) == NULL)
{
MessageBox(NULL, "Window Creation Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK);
return 0;
}
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
while(GetMessage(&Msg, NULL, 0, 0) > 0 && done == 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}

+ 2
- 2
header/libTextSuite.h Dosyayı Görüntüle

@@ -366,7 +366,7 @@ lts_renderer_custom_data_t;

/* image */
typedef void (WINAPI *lts_image_load_callback_t) (lts_image_handle_t handle, int x, int y, lts_color4f_t pixel, void* args);
typedef void (WINAPI *lts_image_blend_callback_t)(lts_image_handle_t handle, lts_color4f_t src, lts_color4f_t dst, lts_color4f_t result, void* args);
typedef void (WINAPI *lts_image_blend_callback_t)(lts_image_handle_t handle, lts_color4f_t src, lts_color4f_t dst, lts_color4f_t* result, void* args);

/* callbacks **********************************************************************************************************************/
lts_context_handle_t (WINAPI *lts_context_create) ();
@@ -417,7 +417,7 @@ lts_error_code_t (WINAPI *lts_text_block_get_left)
lts_error_code_t (WINAPI *lts_text_block_get_vert_align) (lts_text_block_handle_t handle, lts_vert_align_t* value);
lts_error_code_t (WINAPI *lts_text_block_get_horz_align) (lts_text_block_handle_t handle, lts_horz_align_t* value);
lts_error_code_t (WINAPI *lts_text_block_get_clipping) (lts_text_block_handle_t handle, lts_clipping_t* value);
lts_error_code_t (WINAPI *lts_text_block_get_color) (lts_text_block_handle_t handle, lts_color4f_t value);
lts_error_code_t (WINAPI *lts_text_block_get_color) (lts_text_block_handle_t handle, lts_color4f_t* value);
lts_error_code_t (WINAPI *lts_text_block_get_font) (lts_text_block_handle_t handle, lts_font_handle_t* value);
lts_error_code_t (WINAPI *lts_text_block_set_top) (lts_text_block_handle_t handle, int value);
lts_error_code_t (WINAPI *lts_text_block_set_left) (lts_text_block_handle_t handle, int value);


+ 941
- 0
header/libTextSuite.hpp Dosyayı Görüntüle

@@ -0,0 +1,941 @@
#ifndef LIB_TEXT_SUITE_HPP
#define LIB_TEXT_SUITE_HPP

#include <string>
#include <stdint.h>
#include <initializer_list>

#if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64)
# define LTS_WINDOWS
# include <windows.h>
#elif LINUX || __linux__
# define LTS_LINUX
# include <dlfcn.h>
#else
# error "unknown operation system"
#endif

#if __MINGW32__
# define WINAPI __stdcall
#else
# define WINAPI
#endif

/**********************************************************************************************************************************/
/* public interface */
/**********************************************************************************************************************************/
namespace lts
{

/* enumerations *******************************************************************************************************************/
enum class ErrorCode : int32_t
{
Unknown = -1,
None = 0,
// misc
NotInitialized = 1,
InvalidEnum = 2,
InvalidValue = 3,
InvalidOperation = 4,
InvalidType = 5,
// invalid handles
InvalidContextHandle = 100,
InvalidRendererHandle = 101,
InvalidTextBlockHandle = 102,
InvalidFontHandle = 103,
InvalidFontCreatorHandle = 104,
InvalidImageHandle = 105,
InvalidPostProcHandle = 106,
// library
InvalidLibName = 200,
InvalidLibHandle = 201,
InvalidMethodName = 202
};
static_assert(sizeof(ErrorCode) == 4, "size of lts::ErrorCode should be 4");
enum class CodePage : uint32_t
{
cpUTF8,
cpISO_8859_1,
cpISO_8859_2,
cpISO_8859_3,
cpISO_8859_4,
cpISO_8859_5,
cpISO_8859_6,
cpISO_8859_7,
cpISO_8859_8,
cpISO_8859_9,
cpISO_8859_10,
cpISO_8859_11,
cpISO_8859_13,
cpISO_8859_14,
cpISO_8859_15,
cpISO_8859_16,
cpISO_037,
cpISO_437,
cpISO_500,
cpISO_737,
cpISO_775,
cpISO_850,
cpISO_852,
cpISO_855,
cpISO_857,
cpISO_860,
cpISO_861,
cpISO_862,
cpISO_863,
cpISO_864,
cpISO_865,
cpISO_866,
cpISO_869,
cpISO_874,
cpISO_875,
cpISO_1026,
cpISO_1250,
cpISO_1251,
cpISO_1252,
cpISO_1253,
cpISO_1254,
cpISO_1255,
cpISO_1256,
cpISO_1257,
cpISO_1258
};
static_assert(sizeof(CodePage) == 4, "size of lts::CodePage should be 4");
enum class Format : uint32_t
{
Empty,
RGBA8,
LumAlpha8,
Alpha8,
Lum8
};
static_assert(sizeof(Format) == 4, "size of lts::Format should be 4");
enum class RendererType : uint32_t
{
Unknown,
OpenGL,
OpenGLES
};
static_assert(sizeof(RendererType) == 4, "size of lts::RendererType should be 4");
enum class FontCreatorType : uint32_t
{
Unknown,
FreeType,
GDI,
Custom
};
static_assert(sizeof(FontCreatorType) == 4, "size of lts::FontCreatorType should be 4");
enum class VertAlign : uint32_t
{
Top,
Center,
Bottom
};
static_assert(sizeof(VertAlign) == 4, "size of lts::VertAlign should be 4");
enum class HorzAlign : uint32_t
{
Left,
Center,
Right,
Justify
};
static_assert(sizeof(HorzAlign) == 4, "size of lts::HorzAlign should be 4");
enum class Clipping : uint32_t
{
None,
WordBorder,
CharBorder,
WordComplete,
CharComplete
};
static_assert(sizeof(Clipping) == 4, "size of lts::Clipping should be 4");
enum class AntiAliasing : uint32_t
{
None,
Normal
};
static_assert(sizeof(AntiAliasing) == 4, "size of lts::AntiAliasing should be 4");
enum class CharRangeUsage : uint32_t
{
Include,
Exclude
};
static_assert(sizeof(CharRangeUsage) == 4, "size of lts::CharRangeUsage should be 4");
enum class ImageMode : uint32_t
{
Ignore,
Replace,
Modulate
};
static_assert(sizeof(ImageMode) == 4, "size of lts::ImageMode should be 4");

/* flags **************************************************************************************************************************/
template <typename TEnum, typename TBase>
class Flags
{
private:
TBase _value;
public:
inline bool isSet(const TEnum& e) const
{ return (_value & (1 << e)); };
inline void set(const TEnum& e)
{ _value |= (1 << e); };
inline void unset(const TEnum& e)
{ _value &= ~(1 << e); };
inline void clear()
{ _value = 0; };
Flags() :
_value(0)
{ };
Flags(const TEnum& e) :
_value(1 << e)
{ };
Flags(const std::initializer_list<TEnum>& vec) :
_value(0)
{
for (const auto& e : vec)
set(e);
};
template <typename T>
Flags(T begIt, T endIt) :
_value(0)
{
for (auto i = begIt; i != endIt; ++i)
set(*i);
};
};
enum class BlockFlag
{
WordWrap
};
typedef Flags<BlockFlag, uint32_t> BlockFlags;
enum class FontStyle
{
Bold,
Italic,
Underline,
Strikeout,
};
typedef Flags<FontStyle, uint32_t> FontStyles;
enum class ColorChannel
{
Red,
Green,
Blue,
Alpha
};
typedef Flags<ColorChannel, uint32_t> ColorChannels;
/* structures *********************************************************************************************************************/
struct Position
{
int x;
int y;
};
union Rect
{
struct { Position top_left, bottom_right; };
struct { int32_t left, top, right, bottom; };
};
union Color4f
{
struct { float r, g, b, a; };
float arr[4];
};
struct GlyphMetric
{
Position glyphOrigin;
Rect glyphRect;
int32_t advance;
};
struct TextMetric
{
int32_t ascent;
int32_t descent;
int32_t externalLeading;
int32_t baseLineOffset;
int32_t charSpacing;
int32_t lineHeight;
int32_t lineSpacing;
};
struct FontMetric
{
int32_t size;
FontStyles styles;
AntiAliasing antiAliasing;
wchar_t defaultChar;
uint8_t __reserved[2];
int32_t ascent;
int32_t descent;
int32_t externalLeading;
int32_t baseLineOffset;
int32_t underlinePos;
int32_t underlineSize;
int32_t strikeoutPos;
int32_t strikeoutSize;
};
typedef float Vector4f[4];
typedef Vector4f Matrix4f[4];
typedef ImageMode ImageModes[4];
typedef void* Handle;
typedef Handle ContextHandle;
typedef Handle RendererHandle;
typedef Handle TextBlockHandle;
typedef Handle FontCreatorHandle;
typedef Handle FontHandle;
typedef Handle PostProcessorHandle;
typedef Handle ImageHandle;
typedef Handle CharHandle;
class Exception : public std::exception
{
private:
std::string _message;
ErrorCode _errorCode;
public:
ErrorCode getErrorCode() const;
std::string getMessage() const;
virtual const char* what() const throw();
Exception(std::string message, ErrorCode errorCode = ErrorCode::Unknown);
~Exception() throw();
};
class Library
{
public:
#if defined(LTS_WINDOWS)
typedef HMODULE Handle; //!< shader file handle
#elif defined(LTS_LINUX)
typedef void* Handle; //!< shader file handle
#else
#error "unknown operation system"
#endif
private:
struct Impl;
Impl* _impl;
Handle _handle;
public:
ErrorCode getLastErrorCode() const;
std::string getLastErrorMsg() const;
Library(const std::string& libName);
~Library();
private:
Library(const Library& that) { };
};
}

/**********************************************************************************************************************************/
/* private implementation */
/**********************************************************************************************************************************/
#if defined(LTS_WINDOWS)
lts::Library::Handle libOpen(const char* name)
{ return LoadLibrary(name); };

template <typename T>
T getAddr(lts::Library::Handle handle, const char* name)
{ return reinterpret_cast<T>(GetProcAddress(handle, name)); };

int libClose(lts::Library::Handle handle)
{ return FreeLibrary(handle); };

#elif defined(LTS_LINUX)
lts::Library::Handle libOpen(const char* name)
{ return dlopen(name, RTLD_LAZY); };

template <typename T>
T getAddr(lts::Library::Handle handle, const char* name)
{ return reinterpret_cast<T>(dlsym(handle, name)); };

int libClose(lts::Library::Handle handle)
{ return !dlclose(handle); };

#else
# error "unknown operation system"
#endif

/* Library::Impl ******************************************************************************************************************/
struct lts::Library::Impl
{
public: /* stream */
struct StreamData
{
enum class Origin : uint32_t
{
Begin = 0,
Current = 1,
End = 2
};
static_assert(sizeof(Origin) == 4, "size of lts::StreamOrigin should be 4");
typedef int (WINAPI *stream_read_t)(void* args, void* buffer, int count);
typedef int (WINAPI *stream_seek_t)(void* args, Origin origin, int offset);
void* args;
stream_read_t read;
stream_seek_t seek;
};
public: /* custom post processor */
struct PostProcessorData
{
typedef void (WINAPI *post_processor_execute_t)(lts::CharHandle charHandle, lts::ImageHandle imageHandle);
void* args;
post_processor_execute_t execute;
};
public: /* custom renderer */
struct RendererCustomData
{
typedef void (WINAPI *renderer_begin_render_t) (void* args);
typedef void (WINAPI *renderer_end_render_t) (void* args);
typedef lts::Position (WINAPI *renderer_get_draw_pos_t) (void* args);
typedef void (WINAPI *renderer_set_draw_pos_t) (lts::Position value, void* args);
typedef void (WINAPI *renderer_move_draw_pos_t) (lts::Position value, void* args);
typedef void (WINAPI *renderer_set_color_t) (lts::Color4f value, void* args);
typedef void (WINAPI *renderer_render) (void* ref, int forcedWidth, void* args);
typedef void* (WINAPI *renderer_create_ref) (lts::CharHandle charHandle, lts::ImageHandle imageHandle, void* args);
typedef void (WINAPI *renderer_free_ref) (void* ref, void* args);
void* args;
renderer_begin_render_t beginRender;
renderer_end_render_t endRender;
renderer_get_draw_pos_t getDrawPos;
renderer_set_draw_pos_t setDrawPos;
renderer_move_draw_pos_t moveDrawPos;
renderer_set_color_t setColor;
renderer_render render;
renderer_create_ref createRef;
renderer_free_ref freeRef;
};
public: /* callbacks */
typedef void (WINAPI *image_load_callback_t) (lts::ImageHandle handle, int x, int y, lts::Color4f pixel, void* args);
typedef void (WINAPI *image_blend_callback_t)(lts::ImageHandle handle, lts::Color4f src, lts::Color4f dst, lts::Color4f& result, void* args);
typedef lts::ContextHandle (WINAPI *context_create_t) ();
typedef lts::ErrorCode (WINAPI *context_get_code_page_t) (lts::ContextHandle handle, lts::CodePage* value);
typedef lts::ErrorCode (WINAPI *context_get_default_char_t) (lts::ContextHandle handle, wchar_t& value);
typedef lts::ErrorCode (WINAPI *context_set_code_page_t) (lts::ContextHandle handle, lts::CodePage value);
typedef lts::ErrorCode (WINAPI *context_set_default_char_t) (lts::ContextHandle handle, wchar_t value);
typedef wchar_t* (WINAPI *context_ansi_to_wide_t) (lts::ContextHandle handle, const char* text);
typedef lts::ErrorCode (WINAPI *context_destroy_t) (lts::ContextHandle handle);
typedef lts::RendererHandle (WINAPI *renderer_create_t) (lts::ContextHandle handle, lts::RendererType type, lts::Format format);
typedef lts::RendererHandle (WINAPI *renderer_create_custom_t) (lts::ContextHandle handle, lts::Format format, const RendererCustomData& data);
typedef lts::TextBlockHandle (WINAPI *renderer_begin_block_t) (lts::RendererHandle handle, int top, int left, int width, int height, lts::BlockFlags flags);
typedef lts::ErrorCode (WINAPI *renderer_end_block_t) (lts::RendererHandle handle, lts::TextBlockHandle block);
typedef lts::ErrorCode (WINAPI *renderer_abort_block_t) (lts::RendererHandle handle, lts::TextBlockHandle block);
typedef int (WINAPI *renderer_get_text_width_a_t) (lts::RendererHandle handle, lts::FontHandle font, const char* text);
typedef int (WINAPI *renderer_get_text_width_w_t) (lts::RendererHandle handle, lts::FontHandle font, const wchar_t* text);
typedef lts::ErrorCode (WINAPI *renderer_destroy_t) (lts::RendererHandle handle);
typedef lts::FontCreatorHandle (WINAPI *font_creator_create_t) (lts::ContextHandle handle, lts::FontCreatorType type);
typedef lts::FontHandle (WINAPI *font_creator_get_font_by_name_t) (lts::FontCreatorHandle handle, const char* fontname, int size, lts::FontStyles style, lts::AntiAliasing antialiasing);
typedef lts::FontHandle (WINAPI *font_creator_get_font_by_file_t) (lts::FontCreatorHandle handle, const char* filename, int size, lts::FontStyles style, lts::AntiAliasing antialiasing);
typedef lts::FontHandle (WINAPI *font_creator_get_font_by_stream_t) (lts::FontCreatorHandle handle, StreamData* stream, int size, lts::FontStyles style, lts::AntiAliasing antialiasing);
typedef lts::ErrorCode (WINAPI *font_creator_destroy_t) (lts::FontCreatorHandle handle);
typedef lts::PostProcessorHandle(WINAPI *font_get_post_processor_t) (lts::FontHandle handle);
typedef lts::ErrorCode (WINAPI *font_get_tab_width_t) (lts::FontHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *font_get_char_spacing_t) (lts::FontHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *font_get_line_spacing_t) (lts::FontHandle handle, float& value);
typedef lts::ErrorCode (WINAPI *font_get_metric_t) (lts::FontHandle handle, lts::FontMetric& value);
typedef const char* (WINAPI *font_get_fontname_t) (lts::FontHandle handle);
typedef const char* (WINAPI *font_get_facename_t) (lts::FontHandle handle);
typedef const char* (WINAPI *font_get_stylename_t) (lts::FontHandle handle);
typedef const char* (WINAPI *font_get_fillname_t) (lts::FontHandle handle);
typedef const char* (WINAPI *font_get_copyright_t) (lts::FontHandle handle);
typedef lts::ErrorCode (WINAPI *font_set_post_processor_t) (lts::FontHandle handle, lts::PostProcessorHandle pp);
typedef lts::ErrorCode (WINAPI *font_set_tab_width_t) (lts::FontHandle handle, int value);
typedef lts::ErrorCode (WINAPI *font_set_char_spacing_t) (lts::FontHandle handle, int value);
typedef lts::ErrorCode (WINAPI *font_set_line_spacing_t) (lts::FontHandle handle, float value);
typedef lts::ErrorCode (WINAPI *font_destroy_t) (lts::FontHandle handle);
typedef lts::ErrorCode (WINAPI *text_block_get_rect_t) (lts::TextBlockHandle handle, lts::Rect& value);
typedef lts::ErrorCode (WINAPI *text_block_get_width_t) (lts::TextBlockHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *text_block_get_height_t) (lts::TextBlockHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *text_block_get_flags_t) (lts::TextBlockHandle handle, lts::BlockFlags& value);
typedef lts::ErrorCode (WINAPI *text_block_get_top_t) (lts::TextBlockHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *text_block_get_left_t) (lts::TextBlockHandle handle, int& value);
typedef lts::ErrorCode (WINAPI *text_block_get_vert_align_t) (lts::TextBlockHandle handle, lts::VertAlign& value);
typedef lts::ErrorCode (WINAPI *text_block_get_horz_align_t) (lts::TextBlockHandle handle, lts::HorzAlign& value);
typedef lts::ErrorCode (WINAPI *text_block_get_clipping_t) (lts::TextBlockHandle handle, lts::Clipping& value);
typedef lts::ErrorCode (WINAPI *text_block_get_color_t) (lts::TextBlockHandle handle, lts::Color4f& value);
typedef lts::ErrorCode (WINAPI *text_block_get_font_t) (lts::TextBlockHandle handle, lts::FontHandle& value);
typedef lts::ErrorCode (WINAPI *text_block_set_top_t) (lts::TextBlockHandle handle, int value);
typedef lts::ErrorCode (WINAPI *text_block_set_left_t) (lts::TextBlockHandle handle, int value);
typedef lts::ErrorCode (WINAPI *text_block_set_vert_align_t) (lts::TextBlockHandle handle, lts::VertAlign value);
typedef lts::ErrorCode (WINAPI *text_block_set_horz_align_t) (lts::TextBlockHandle handle, lts::HorzAlign value);
typedef lts::ErrorCode (WINAPI *text_block_set_clipping_t) (lts::TextBlockHandle handle, lts::Clipping value);
typedef lts::ErrorCode (WINAPI *text_block_set_color_t) (lts::TextBlockHandle handle, lts::Color4f value);
typedef lts::ErrorCode (WINAPI *text_block_set_font_t) (lts::TextBlockHandle handle, lts::FontHandle value);
typedef int (WINAPI *text_block_get_actual_height_t) (lts::TextBlockHandle handle);
typedef int (WINAPI *text_block_get_text_width_a_t) (lts::TextBlockHandle handle, const char* text);
typedef int (WINAPI *text_block_get_text_width_w_t) (lts::TextBlockHandle handle, const wchar_t* text);
typedef lts::ErrorCode (WINAPI *text_block_text_out_a_t) (lts::TextBlockHandle handle, const char* text);
typedef lts::ErrorCode (WINAPI *text_block_text_out_w_t) (lts::TextBlockHandle handle, const wchar_t* text);
typedef lts::ErrorCode (WINAPI *text_block_destroy_t) (lts::TextBlockHandle handle);
typedef lts::ImageHandle (WINAPI *image_create_t) (lts::ContextHandle handle);
typedef lts::ErrorCode (WINAPI *image_is_empty_t) (lts::ImageHandle handle, bool& value);
typedef int (WINAPI *image_get_width_t) (lts::ImageHandle handle);
typedef int (WINAPI *image_get_height_t) (lts::ImageHandle handle);
typedef int (WINAPI *image_get_line_size_t) (lts::ImageHandle handle);
typedef int (WINAPI *image_get_data_size_t) (lts::ImageHandle handle);
typedef lts::ErrorCode (WINAPI *image_get_format_t) (lts::ImageHandle handle, lts::Format& value);
typedef void* (WINAPI *image_get_data_t) (lts::ImageHandle handle);
typedef void* (WINAPI *image_get_scanline_t) (lts::ImageHandle handle, int index);
typedef lts::ErrorCode (WINAPI *image_get_pixel_at_t) (lts::ImageHandle handle, int x, int y, lts::Color4f pixel);
typedef lts::ErrorCode (WINAPI *image_assign_t) (lts::ImageHandle handle, lts::ImageHandle source);
typedef lts::ErrorCode (WINAPI *image_create_empty_t) (lts::ImageHandle handle, lts::Format format, int width, int height);
typedef lts::ErrorCode (WINAPI *image_load_from_func_t) (lts::ImageHandle handle, image_load_callback_t callback, void* args);
typedef lts::ErrorCode (WINAPI *image_resize_t) (lts::ImageHandle handle, int width, int height, int x, int y);
typedef lts::ErrorCode (WINAPI *image_fill_color_t) (lts::ImageHandle handle, lts::Color4f color, lts::ColorChannels mask, lts::ImageModes modes);
typedef lts::ErrorCode (WINAPI *image_fill_pattern_t) (lts::ImageHandle handle, lts::ImageHandle pattern, int x, int y, lts::ColorChannels mask, lts::ImageModes modes);
typedef lts::ErrorCode (WINAPI *image_blend_t) (lts::ImageHandle handle, lts::ImageHandle source, int x, int y, image_blend_callback_t callback, void* args);
typedef lts::ErrorCode (WINAPI *image_blur_t) (lts::ImageHandle handle, float horzRad, float horzStr, float vertRad, float vertStr, lts::ColorChannels mask);
typedef lts::ErrorCode (WINAPI *image_destroy_t) (lts::ImageHandle handle);
typedef lts::ErrorCode (WINAPI *post_processor_add_range_t) (lts::PostProcessorHandle handle, lts::CharRangeUsage usage, wchar_t start, wchar_t stop);
typedef lts::ErrorCode (WINAPI *post_processor_add_chars_t) (lts::PostProcessorHandle handle, lts::CharRangeUsage usage, const wchar_t* chars);
typedef lts::ErrorCode (WINAPI *post_processor_clear_ranges_t) (lts::PostProcessorHandle handle);
typedef lts::ErrorCode (WINAPI *post_processor_execute_t) (lts::PostProcessorHandle handle, lts::CharHandle charHandle, lts::ImageHandle image);
typedef lts::PostProcessorHandle(WINAPI *post_processor_fill_color_create_t) (lts::PostProcessorHandle handle, lts::Color4f color, lts::ImageModes modes, lts::ColorChannels channels);
typedef lts::PostProcessorHandle(WINAPI *post_processor_fill_pattern_create_t) (lts::PostProcessorHandle handle, lts::ImageHandle pattern, bool ownsPattern, lts::Position position, lts::ImageModes modes, lts::ColorChannels channels);
typedef lts::PostProcessorHandle(WINAPI *post_processor_border_create_t) (lts::PostProcessorHandle handle, float width, float strength, lts::Color4f color, bool keepSize);
typedef lts::PostProcessorHandle(WINAPI *post_processor_shadow_create_t) (lts::PostProcessorHandle handle, float radius, float strength, lts::Position offset, lts::Color4f color);
typedef lts::PostProcessorHandle(WINAPI *post_processor_custom_create_t) (lts::PostProcessorHandle handle, const PostProcessorData& data);
typedef lts::ErrorCode (WINAPI *post_processor_destroy_t) (lts::PostProcessorHandle handle);
typedef lts::ErrorCode (WINAPI *char_get_char_code_t) (lts::CharHandle handle, wchar_t* value);
typedef lts::ErrorCode (WINAPI *char_get_glyph_metric_t) (lts::CharHandle handle, lts::GlyphMetric& value);
typedef lts::ErrorCode (WINAPI *char_set_glyph_metric_t) (lts::CharHandle handle, lts::GlyphMetric value);

typedef lts::ErrorCode (WINAPI *initialize_t) ();
typedef lts::ErrorCode (WINAPI *get_last_error_code_t) ();
typedef const char* (WINAPI *get_last_error_msg_t) ();
typedef lts::ErrorCode (WINAPI *finalize_t) ();
private:
lts::Library::Handle _handle;
template <typename T>
inline void loadProc(T& proc, const char* name)
{
proc = getAddr<T>(_handle, name);
if (!proc)
throw lts::Exception(std::string("unable to load method from library: ") + name, lts::ErrorCode::InvalidMethodName);
}

public:
context_create_t context_create;
context_get_code_page_t context_get_code_page;
context_get_default_char_t context_get_default_char;
context_set_code_page_t context_set_code_page;
context_set_default_char_t context_set_default_char;
context_ansi_to_wide_t context_ansi_to_wide;
context_destroy_t context_destroy;
renderer_create_t renderer_create;
renderer_create_custom_t renderer_create_custom;
renderer_begin_block_t renderer_begin_block;
renderer_end_block_t renderer_end_block;
renderer_abort_block_t renderer_abort_block;
renderer_get_text_width_a_t renderer_get_text_width_a;
renderer_get_text_width_w_t renderer_get_text_width_w;
renderer_destroy_t renderer_destroy;
font_creator_create_t font_creator_create;
font_creator_get_font_by_name_t font_creator_get_font_by_name;
font_creator_get_font_by_file_t font_creator_get_font_by_file;
font_creator_get_font_by_stream_t font_creator_get_font_by_stream;
font_creator_destroy_t font_creator_destroy;
font_get_post_processor_t font_get_post_processor;
font_get_tab_width_t font_get_tab_width;
font_get_char_spacing_t font_get_char_spacing;
font_get_line_spacing_t font_get_line_spacing;
font_get_metric_t font_get_metric;
font_get_fontname_t font_get_fontname;
font_get_facename_t font_get_facename;
font_get_stylename_t font_get_stylename;
font_get_fillname_t font_get_fillname;
font_get_copyright_t font_get_copyright;
font_set_post_processor_t font_set_post_processor;
font_set_tab_width_t font_set_tab_width;
font_set_char_spacing_t font_set_char_spacing;
font_set_line_spacing_t font_set_line_spacing;
font_destroy_t font_destroy;
text_block_get_rect_t text_block_get_rect;
text_block_get_width_t text_block_get_width;
text_block_get_height_t text_block_get_height;
text_block_get_flags_t text_block_get_flags;
text_block_get_top_t text_block_get_top;
text_block_get_left_t text_block_get_left;
text_block_get_vert_align_t text_block_get_vert_align;
text_block_get_horz_align_t text_block_get_horz_align;
text_block_get_clipping_t text_block_get_clipping;
text_block_get_color_t text_block_get_color;
text_block_get_font_t text_block_get_font;
text_block_set_top_t text_block_set_top;
text_block_set_left_t text_block_set_left;
text_block_set_vert_align_t text_block_set_vert_align;
text_block_set_horz_align_t text_block_set_horz_align;
text_block_set_clipping_t text_block_set_clipping;
text_block_set_color_t text_block_set_color;
text_block_set_font_t text_block_set_font;
text_block_get_actual_height_t text_block_get_actual_height;
text_block_get_text_width_a_t text_block_get_text_width_a;
text_block_get_text_width_w_t text_block_get_text_width_w;
text_block_text_out_a_t text_block_text_out_a;
text_block_text_out_w_t text_block_text_out_w;
text_block_destroy_t text_block_destroy;
image_create_t image_create;
image_is_empty_t image_is_empty;
image_get_width_t image_get_width;
image_get_height_t image_get_height;
image_get_line_size_t image_get_line_size;
image_get_data_size_t image_get_data_size;
image_get_format_t image_get_format;
image_get_data_t image_get_data;
image_get_scanline_t image_get_scanline;
image_get_pixel_at_t image_get_pixel_at;
image_assign_t image_assign;
image_create_empty_t image_create_empty;
image_load_from_func_t image_load_from_func;
image_resize_t image_resize;
image_fill_color_t image_fill_color;
image_fill_pattern_t image_fill_pattern;
image_blend_t image_blend;
image_blur_t image_blur;
image_destroy_t image_destroy;
post_processor_add_range_t post_processor_add_range;
post_processor_add_chars_t post_processor_add_chars;
post_processor_clear_ranges_t post_processor_clear_ranges;
post_processor_execute_t post_processor_execute;
post_processor_fill_color_create_t post_processor_fill_color_create;
post_processor_fill_pattern_create_t post_processor_fill_pattern_create;
post_processor_border_create_t post_processor_border_create;
post_processor_shadow_create_t post_processor_shadow_create;
post_processor_custom_create_t post_processor_custom_create;
post_processor_destroy_t post_processor_destroy;
char_get_char_code_t char_get_char_code;
char_get_glyph_metric_t char_get_glyph_metric;
char_set_glyph_metric_t char_set_glyph_metric;
initialize_t initialize;
get_last_error_code_t get_last_error_code;
get_last_error_msg_t get_last_error_msg;
finalize_t finalize;
public:
Impl(lts::Library::Handle handle) :
_handle (handle),
context_create (NULL),
context_get_code_page (NULL),
context_get_default_char (NULL),
context_set_code_page (NULL),
context_set_default_char (NULL),
context_ansi_to_wide (NULL),
context_destroy (NULL),
renderer_create (NULL),
renderer_create_custom (NULL),
renderer_begin_block (NULL),
renderer_end_block (NULL),
renderer_abort_block (NULL),
renderer_get_text_width_a (NULL),
renderer_get_text_width_w (NULL),
renderer_destroy (NULL),
font_creator_create (NULL),
font_creator_get_font_by_name (NULL),
font_creator_get_font_by_file (NULL),
font_creator_get_font_by_stream (NULL),
font_creator_destroy (NULL),
font_get_post_processor (NULL),
font_get_tab_width (NULL),
font_get_char_spacing (NULL),
font_get_line_spacing (NULL),
font_get_metric (NULL),
font_get_fontname (NULL),
font_get_facename (NULL),
font_get_stylename (NULL),
font_get_fillname (NULL),
font_get_copyright (NULL),
font_set_post_processor (NULL),
font_set_tab_width (NULL),
font_set_char_spacing (NULL),
font_set_line_spacing (NULL),
font_destroy (NULL),
text_block_get_rect (NULL),
text_block_get_width (NULL),
text_block_get_height (NULL),
text_block_get_flags (NULL),
text_block_get_top (NULL),
text_block_get_left (NULL),
text_block_get_vert_align (NULL),
text_block_get_horz_align (NULL),
text_block_get_clipping (NULL),
text_block_get_color (NULL),
text_block_get_font (NULL),
text_block_set_top (NULL),
text_block_set_left (NULL),
text_block_set_vert_align (NULL),
text_block_set_horz_align (NULL),
text_block_set_clipping (NULL),
text_block_set_color (NULL),
text_block_set_font (NULL),
text_block_get_actual_height (NULL),
text_block_get_text_width_a (NULL),
text_block_get_text_width_w (NULL),
text_block_text_out_a (NULL),
text_block_text_out_w (NULL),
text_block_destroy (NULL),
image_create (NULL),
image_is_empty (NULL),
image_get_width (NULL),
image_get_height (NULL),
image_get_line_size (NULL),
image_get_data_size (NULL),
image_get_format (NULL),
image_get_data (NULL),
image_get_scanline (NULL),
image_get_pixel_at (NULL),
image_assign (NULL),
image_create_empty (NULL),
image_load_from_func (NULL),
image_resize (NULL),
image_fill_color (NULL),
image_fill_pattern (NULL),
image_blend (NULL),
image_blur (NULL),
image_destroy (NULL),
post_processor_add_range (NULL),
post_processor_add_chars (NULL),
post_processor_clear_ranges (NULL),
post_processor_execute (NULL),
post_processor_fill_color_create (NULL),
post_processor_fill_pattern_create (NULL),
post_processor_border_create (NULL),
post_processor_shadow_create (NULL),
post_processor_custom_create (NULL),
post_processor_destroy (NULL),
char_get_char_code (NULL),
char_get_glyph_metric (NULL),
char_set_glyph_metric (NULL),
get_last_error_code (NULL),
get_last_error_msg (NULL)
{
loadProc(context_create, "ltsContextCreate");
loadProc(context_get_code_page, "ltsContextGetCodePage");
loadProc(context_get_default_char, "ltsContextGetDefaultChar");
loadProc(context_set_code_page, "ltsContextSetCodePage");
loadProc(context_set_default_char, "ltsContextSetDefaultChar");
loadProc(context_ansi_to_wide, "ltsContextAnsiToWide");
loadProc(context_destroy, "ltsContextDestroy");
loadProc(renderer_create, "ltsRendererCreate");
loadProc(renderer_create_custom, "ltsRendererCustomCreate");
loadProc(renderer_begin_block, "ltsRendererBeginBlock");
loadProc(renderer_end_block, "ltsRendererEndBlock");
loadProc(renderer_abort_block, "ltsRendererAbortBlock");
loadProc(renderer_get_text_width_a, "ltsRendererGetTextWidthA");
loadProc(renderer_get_text_width_w, "ltsRendererGetTextWidthW");
loadProc(renderer_destroy, "ltsRendererDestroy");
loadProc(font_creator_create, "ltsFontCreatorCreate");
loadProc(font_creator_get_font_by_name, "ltsFontCreatorGetFontByName");
loadProc(font_creator_get_font_by_file, "ltsFontCreatorGetFontByFile");
loadProc(font_creator_get_font_by_stream, "ltsFontCreatorGetFontByStream");
loadProc(font_creator_destroy, "ltsFontCreatorDestroy");
loadProc(font_get_post_processor, "ltsFontGetPostProcessor");
loadProc(font_get_tab_width, "ltsFontGetTabWidth");
loadProc(font_get_char_spacing, "ltsFontGetCharSpacing");
loadProc(font_get_line_spacing, "ltsFontGetLineSpacing");
loadProc(font_get_metric, "ltsFontGetMetric");
loadProc(font_get_fontname, "ltsFontGetFontname");
loadProc(font_get_facename, "ltsFontGetFacename");
loadProc(font_get_stylename, "ltsFontGetStylename");
loadProc(font_get_fillname, "ltsFontGetFullname");
loadProc(font_get_copyright, "ltsFontGetCopyright");
loadProc(font_set_post_processor, "ltsFontSetPostProcessor");
loadProc(font_set_tab_width, "ltsFontSetTabWidth");
loadProc(font_set_char_spacing, "ltsFontSetCharSpacing");
loadProc(font_set_line_spacing, "ltsFontSetLineSpacing");
loadProc(font_destroy, "ltsFontDestroy");
loadProc(text_block_get_rect, "ltsTextBlockGetRect");
loadProc(text_block_get_width, "ltsTextBlockGetWidth");
loadProc(text_block_get_height, "ltsTextBlockGetHeight");
loadProc(text_block_get_flags, "ltsTextBlockGetFlags");
loadProc(text_block_get_top, "ltsTextBlockGetTop");
loadProc(text_block_get_left, "ltsTextBlockGetLeft");
loadProc(text_block_get_vert_align, "ltsTextBlockGetVertAlign");
loadProc(text_block_get_horz_align, "ltsTextBlockGetHorzAlign");
loadProc(text_block_get_clipping, "ltsTextBlockGetClipping");
loadProc(text_block_get_color, "ltsTextBlockGetColor");
loadProc(text_block_get_font, "ltsTextBlockGetFont");
loadProc(text_block_set_top, "ltsTextBlockSetTop");
loadProc(text_block_set_left, "ltsTextBlockSetLeft");
loadProc(text_block_set_vert_align, "ltsTextBlockSetVertAlign");
loadProc(text_block_set_horz_align, "ltsTextBlockSetHorzAlign");
loadProc(text_block_set_clipping, "ltsTextBlockSetClipping");
loadProc(text_block_set_color, "ltsTextBlockSetColor");
loadProc(text_block_set_font, "ltsTextBlockSetFont");
loadProc(text_block_get_actual_height, "ltsTextBlockGetActualHeight");
loadProc(text_block_get_text_width_a, "ltsTextBlockGetTextWidthA");
loadProc(text_block_get_text_width_w, "ltsTextBlockGetTextWidthW");
loadProc(text_block_text_out_a, "ltsTextBlockTextOutA");
loadProc(text_block_text_out_w, "ltsTextBlockTextOutW");
loadProc(text_block_destroy, "ltsTextBlockDestroy");
loadProc(image_create, "ltsImageCreate");
loadProc(image_is_empty, "ltsImageIsEmpty");
loadProc(image_get_width, "ltsImageGetWidth");
loadProc(image_get_height, "ltsImageGetHeight");
loadProc(image_get_line_size, "ltsImageGetLineSize");
loadProc(image_get_data_size, "ltsImageGetDataSize");
loadProc(image_get_format, "ltsImageGetFormat");
loadProc(image_get_data, "ltsImageGetData");
loadProc(image_get_scanline, "ltsImageGetScanline");
loadProc(image_get_pixel_at, "ltsImageGetPixelAt");
loadProc(image_assign, "ltsImageAssign");
loadProc(image_create_empty, "ltsImageCreateEmpty");
loadProc(image_load_from_func, "ltsImageLoadFromFunc");
loadProc(image_resize, "ltsImageResize");
loadProc(image_fill_color, "ltsImageFillColor");
loadProc(image_fill_pattern, "ltsImageFillPattern");
loadProc(image_blend, "ltsImageBlend");
loadProc(image_blur, "ltsImageBlur");
loadProc(image_destroy, "ltsImageDestroy");
loadProc(post_processor_add_range, "ltsPostProcessorAddRange");
loadProc(post_processor_add_chars, "ltsPostProcessorAddChars");
loadProc(post_processor_clear_ranges, "ltsPostProcessorClearRanges");
loadProc(post_processor_execute, "ltsPostProcessorExecute");
loadProc(post_processor_fill_color_create, "ltsPostProcessorFillColorCreate");
loadProc(post_processor_fill_pattern_create, "ltsPostProcessorFillPatterCreate");
loadProc(post_processor_border_create, "ltsPostProcessorBorderCreate");
loadProc(post_processor_shadow_create, "ltsPostProcessorShadowCreate");
loadProc(post_processor_custom_create, "ltsPostProcessorCustomCreate");
loadProc(post_processor_destroy, "ltsPostProcessorDestroy");
loadProc(char_get_char_code, "ltsCharGetCharCode");
loadProc(char_get_glyph_metric, "ltsCharGetGlyphMetric");
loadProc(char_set_glyph_metric, "ltsCharSetGlyphMetric");
loadProc(initialize, "ltsInitialize");
loadProc(get_last_error_code, "ltsGetLastErrorCode");
loadProc(get_last_error_msg, "ltsGetLastErrorMsg");
loadProc(finalize, "ltsFinalize");
auto err = initialize();
if (err != ErrorCode::None)
throw Exception(std::string("unable to initialize library: ") + get_last_error_msg(), get_last_error_code());
};
~Impl()
{
finalize();
}
};

/* Exception **********************************************************************************************************************/
inline lts::ErrorCode lts::Exception::getErrorCode() const
{ return _errorCode; }

inline std::string lts::Exception::getMessage() const
{ return _message; }

const char* lts::Exception::what() const throw()
{ return _message.c_str(); };

lts::Exception::Exception(std::string message, ErrorCode errorCode) :
_message (message),
_errorCode (errorCode)
{ }

lts::Exception::~Exception() throw()
{ }

/* Library ************************************************************************************************************************/
inline lts::ErrorCode lts::Library::getLastErrorCode() const
{ return _impl->get_last_error_code(); }

inline std::string lts::Library::getLastErrorMsg() const
{ return std::string(_impl->get_last_error_msg()); }

lts::Library::Library(const std::string& libName) :
_handle (0),
_impl (NULL)
{
_handle = libOpen(libName.c_str());
if (!_handle)
throw Exception("unable to open shared library: " + libName, lts::ErrorCode::InvalidLibHandle);
}

lts::Library::~Library()
{
if (_impl)
{
delete _impl;
_impl = NULL;
}
if (_handle)
{
libClose(_handle);
_handle = NULL;
}
}

/* Context ************************************************************************************************************************/

#endif /* LIB_TEXT_SUITE_HPP */

+ 1
- 1
header/ulibTextSuite.pas Dosyayı Görüntüle

@@ -334,7 +334,7 @@ type
TltsImageBlendFunc = function (aSrc, aDst: TltsColor4f; aArgs: Pointer): TltsColor4f;

TltsImageLoadInternFunc = procedure(aHandle: TltsImageHandle; X, Y: Integer; var aPixel: TltsColor4f; aArgs: Pointer); stdcall;
TltsImageBlendInternFunc = function (aHandle: TltsImageHandle; aSrc, aDst: TltsColor4f; aArgs: Pointer): TltsColor4f; stdcall;
TltsImageBlendInternFunc = procedure(aHandle: TltsImageHandle; aSrc, aDst: TltsColor4f; out aResult: TltsColor4f; aArgs: Pointer); stdcall;

TltsContextCreate = function(): TltsContextHandle; stdcall;
TltsContextGetCodePage = function(aHandle: TltsContextHandle; out aCodePage: TltsCodePage): TltsErrorCode; stdcall;


+ 4
- 4
ultsChar.pas Dosyayı Görüntüle

@@ -8,8 +8,8 @@ uses
Classes, SysUtils,
utsTextSuite, ultsTypes;

function ltsCharGetCharCode (aHandle: TltsCharHandle; var aValue: WideChar): TltsErrorCode; stdcall;
function ltsCharGetGlyphMetric(aHandle: TltsCharHandle; var aValue: TtsGlyphMetric): TltsErrorCode; stdcall;
function ltsCharGetCharCode (aHandle: TltsCharHandle; out aValue: WideChar): TltsErrorCode; stdcall;
function ltsCharGetGlyphMetric(aHandle: TltsCharHandle; out aValue: TtsGlyphMetric): TltsErrorCode; stdcall;
function ltsCharSetGlyphMetric(aHandle: TltsCharHandle; aValue: TtsGlyphMetric): TltsErrorCode; stdcall;

implementation
@@ -20,7 +20,7 @@ uses
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//ltsChar///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsCharGetCharCode(aHandle: TltsCharHandle; var aValue: WideChar): TltsErrorCode; stdcall;
function ltsCharGetCharCode(aHandle: TltsCharHandle; out aValue: WideChar): TltsErrorCode; stdcall;
var
c: TtsChar;
begin
@@ -38,7 +38,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsCharGetGlyphMetric(aHandle: TltsCharHandle; var aValue: TtsGlyphMetric): TltsErrorCode; stdcall;
function ltsCharGetGlyphMetric(aHandle: TltsCharHandle; out aValue: TtsGlyphMetric): TltsErrorCode; stdcall;
var
c: TtsChar;
begin


+ 4
- 4
ultsContext.pas Dosyayı Görüntüle

@@ -17,8 +17,8 @@ type
end;

function ltsContextCreate (): TltsContextHandle; stdcall;
function ltsContextGetCodePage (const aHandle: TltsContextHandle; var aCodePage: TtsCodePage): TltsErrorCode; stdcall;
function ltsContextGetDefaultChar (const aHandle: TltsContextHandle; var aValue: WideChar): TltsErrorCode; stdcall;
function ltsContextGetCodePage (const aHandle: TltsContextHandle; out aCodePage: TtsCodePage): TltsErrorCode; stdcall;
function ltsContextGetDefaultChar (const aHandle: TltsContextHandle; out aValue: WideChar): TltsErrorCode; stdcall;
function ltsContextSetCodePage (const aHandle: TltsContextHandle; aCodePage: TtsCodePage): TltsErrorCode; stdcall;
function ltsContextSetDefaultChar (const aHandle: TltsContextHandle; aValue: WideChar): TltsErrorCode; stdcall;
function ltsContextAnsiToWide (const aHandle: TltsContextHandle; aText: PAnsiChar): PWideChar; stdcall;
@@ -64,7 +64,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsContextGetCodePage(const aHandle: TltsContextHandle; var aCodePage: TtsCodePage): TltsErrorCode; stdcall;
function ltsContextGetCodePage(const aHandle: TltsContextHandle; out aCodePage: TtsCodePage): TltsErrorCode; stdcall;
var
c: TtsContext;
begin
@@ -82,7 +82,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsContextGetDefaultChar(const aHandle: TltsContextHandle; var aValue: WideChar): TltsErrorCode; stdcall;
function ltsContextGetDefaultChar(const aHandle: TltsContextHandle; out aValue: WideChar): TltsErrorCode; stdcall;
var
c: TtsContext;
begin


+ 8
- 8
ultsFont.pas Dosyayı Görüntüle

@@ -10,10 +10,10 @@ uses
ultsTypes;

function ltsFontGetPostProcessor (aHandle: TltsFontHandle): TltsPostProcessorHandle; stdcall;
function ltsFontGetTabWidth (aHandle: TltsFontHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetCharSpacing (aHandle: TltsFontHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetLineSpacing (aHandle: TltsFontHandle; var aValue: Single): TltsErrorCode; stdcall;
function ltsFontGetMetric (aHandle: TltsFontHandle; var aValue: TtsFontMetric): TltsErrorCode; stdcall;
function ltsFontGetTabWidth (aHandle: TltsFontHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetCharSpacing (aHandle: TltsFontHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetLineSpacing (aHandle: TltsFontHandle; out aValue: Single): TltsErrorCode; stdcall;
function ltsFontGetMetric (aHandle: TltsFontHandle; out aValue: TtsFontMetric): TltsErrorCode; stdcall;

function ltsFontGetFontname (aHandle: TltsFontHandle): PAnsiChar; stdcall;
function ltsFontGetFacename (aHandle: TltsFontHandle): PAnsiChar; stdcall;
@@ -53,7 +53,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsFontGetTabWidth(aHandle: TltsFontHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetTabWidth(aHandle: TltsFontHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
f: TtsFont;
begin
@@ -71,7 +71,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsFontGetCharSpacing(aHandle: TltsFontHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsFontGetCharSpacing(aHandle: TltsFontHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
f: TtsFont;
begin
@@ -89,7 +89,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsFontGetLineSpacing(aHandle: TltsFontHandle; var aValue: Single): TltsErrorCode; stdcall;
function ltsFontGetLineSpacing(aHandle: TltsFontHandle; out aValue: Single): TltsErrorCode; stdcall;
var
f: TtsFont;
begin
@@ -107,7 +107,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsFontGetMetric(aHandle: TltsFontHandle; var aValue: TtsFontMetric): TltsErrorCode; stdcall;
function ltsFontGetMetric(aHandle: TltsFontHandle; out aValue: TtsFontMetric): TltsErrorCode; stdcall;
var
f: TtsFont;
begin


+ 6
- 6
ultsImage.pas Dosyayı Görüntüle

@@ -14,15 +14,15 @@ type
TltsImageBlendFunc = procedure(aHandle: TltsImageHandle; aSrc, aDst: TtsColor4f; out aResult: TtsColor4f; aArgs: Pointer); stdcall;

function ltsImageCreate (aContext: TltsContextHandle): TltsImageHandle; stdcall;
function ltsImageIsEmpty (aHandle: TltsImageHandle; var aValue: Boolean): TltsErrorCode; stdcall;
function ltsImageIsEmpty (aHandle: TltsImageHandle; out aValue: Boolean): TltsErrorCode; stdcall;
function ltsImageGetWidth (aHandle: TltsImageHandle): Integer; stdcall;
function ltsImageGetHeight (aHandle: TltsImageHandle): Integer; stdcall;
function ltsImageGetLineSize (aHandle: TltsImageHandle): Integer; stdcall;
function ltsImageGetDataSize (aHandle: TltsImageHandle): Integer; stdcall;
function ltsImageGetFormat (aHandle: TltsImageHandle; var aValue: TtsFormat): TltsErrorCode; stdcall;
function ltsImageGetFormat (aHandle: TltsImageHandle; out aValue: TtsFormat): TltsErrorCode; stdcall;
function ltsImageGetData (aHandle: TltsImageHandle): Pointer; stdcall;
function ltsImageGetScanline (aHandle: TltsImageHandle; aIndex: Integer): Pointer; stdcall;
function ltsImageGetPixelAt (aHandle: TltsImageHandle; aX, aY: Integer; var aColor: TtsColor4f): TltsErrorCode; stdcall;
function ltsImageGetPixelAt (aHandle: TltsImageHandle; aX, aY: Integer; out aColor: TtsColor4f): TltsErrorCode; stdcall;
function ltsImageAssign (aHandle, aSource: TltsImageHandle): TltsErrorCode; stdcall;
function ltsImageCreateEmpty (aHandle: TltsImageHandle; aFormat: TtsFormat; aWidth, aHeight: Integer): TltsErrorCode; stdcall;
function ltsImageLoadFromFunc (aHandle: TltsImageHandle; aCallback: TltsImageLoadFunc; aArgs: Pointer): TltsErrorCode; stdcall;
@@ -93,7 +93,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsImageIsEmpty(aHandle: TltsImageHandle; var aValue: Boolean): TltsErrorCode; stdcall;
function ltsImageIsEmpty(aHandle: TltsImageHandle; out aValue: Boolean): TltsErrorCode; stdcall;
var
img: TtsImage;
begin
@@ -179,7 +179,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsImageGetFormat(aHandle: TltsImageHandle; var aValue: TtsFormat): TltsErrorCode; stdcall;
function ltsImageGetFormat(aHandle: TltsImageHandle; out aValue: TtsFormat): TltsErrorCode; stdcall;
var
img: TtsImage;
begin
@@ -234,7 +234,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsImageGetPixelAt(aHandle: TltsImageHandle; aX, aY: Integer; var aColor: TtsColor4f): TltsErrorCode; stdcall;
function ltsImageGetPixelAt(aHandle: TltsImageHandle; aX, aY: Integer; out aColor: TtsColor4f): TltsErrorCode; stdcall;
var
img: TtsImage;
begin


+ 23
- 23
ultsTextBlock.pas Dosyayı Görüntüle

@@ -9,18 +9,18 @@ uses
utsTextSuite,
ultsTypes;

function ltsTextBlockGetRect (aHandle: TltsTextBlockHandle; var aValue: TtsRect): TltsErrorCode; stdcall;
function ltsTextBlockGetWidth (aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetHeight (aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetFlags (aHandle: TltsTextBlockHandle; var aValue: TtsBlockFlags): TltsErrorCode; stdcall;
function ltsTextBlockGetTop (aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetLeft (aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetVertAlign (aHandle: TltsTextBlockHandle; var aValue: TtsVertAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetHorzAlign (aHandle: TltsTextBlockHandle; var aValue: TtsHorzAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetClipping (aHandle: TltsTextBlockHandle; var aValue: TtsClipping): TltsErrorCode; stdcall;
function ltsTextBlockGetColor (aHandle: TltsTextBlockHandle; var aValue: TtsColor4f): TltsErrorCode; stdcall;
function ltsTextBlockGetFont (aHandle: TltsTextBlockHandle; var aValue: TltsFontHandle): TltsErrorCode; stdcall;
function ltsTextBlockGetRect (aHandle: TltsTextBlockHandle; out aValue: TtsRect): TltsErrorCode; stdcall;
function ltsTextBlockGetWidth (aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetHeight (aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetFlags (aHandle: TltsTextBlockHandle; out aValue: TtsBlockFlags): TltsErrorCode; stdcall;
function ltsTextBlockGetTop (aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetLeft (aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetVertAlign (aHandle: TltsTextBlockHandle; out aValue: TtsVertAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetHorzAlign (aHandle: TltsTextBlockHandle; out aValue: TtsHorzAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetClipping (aHandle: TltsTextBlockHandle; out aValue: TtsClipping): TltsErrorCode; stdcall;
function ltsTextBlockGetColor (aHandle: TltsTextBlockHandle; out aValue: TtsColor4f): TltsErrorCode; stdcall;
function ltsTextBlockGetFont (aHandle: TltsTextBlockHandle; out aValue: TltsFontHandle): TltsErrorCode; stdcall;

function ltsTextBlockSetTop (aHandle: TltsTextBlockHandle; aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockSetLeft (aHandle: TltsTextBlockHandle; aValue: Integer): TltsErrorCode; stdcall;
@@ -47,7 +47,7 @@ uses
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//TextBlock/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetRect(aHandle: TltsTextBlockHandle; var aValue: TtsRect): TltsErrorCode; stdcall;
function ltsTextBlockGetRect(aHandle: TltsTextBlockHandle; out aValue: TtsRect): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -65,7 +65,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetWidth(aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetWidth(aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -83,7 +83,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetHeight(aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetHeight(aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -101,7 +101,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetFlags(aHandle: TltsTextBlockHandle; var aValue: TtsBlockFlags): TltsErrorCode; stdcall;
function ltsTextBlockGetFlags(aHandle: TltsTextBlockHandle; out aValue: TtsBlockFlags): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -119,7 +119,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetTop(aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetTop(aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -137,7 +137,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetLeft(aHandle: TltsTextBlockHandle; var aValue: Integer): TltsErrorCode; stdcall;
function ltsTextBlockGetLeft(aHandle: TltsTextBlockHandle; out aValue: Integer): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -155,7 +155,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetVertAlign(aHandle: TltsTextBlockHandle; var aValue: TtsVertAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetVertAlign(aHandle: TltsTextBlockHandle; out aValue: TtsVertAlignment): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -173,7 +173,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetHorzAlign(aHandle: TltsTextBlockHandle; var aValue: TtsHorzAlignment): TltsErrorCode; stdcall;
function ltsTextBlockGetHorzAlign(aHandle: TltsTextBlockHandle; out aValue: TtsHorzAlignment): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -191,7 +191,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetClipping(aHandle: TltsTextBlockHandle; var aValue: TtsClipping): TltsErrorCode; stdcall;
function ltsTextBlockGetClipping(aHandle: TltsTextBlockHandle; out aValue: TtsClipping): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -209,7 +209,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetColor(aHandle: TltsTextBlockHandle; var aValue: TtsColor4f): TltsErrorCode; stdcall;
function ltsTextBlockGetColor(aHandle: TltsTextBlockHandle; out aValue: TtsColor4f): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin
@@ -227,7 +227,7 @@ begin
end;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ltsTextBlockGetFont(aHandle: TltsTextBlockHandle; var aValue: TltsFontHandle): TltsErrorCode; stdcall;
function ltsTextBlockGetFont(aHandle: TltsTextBlockHandle; out aValue: TltsFontHandle): TltsErrorCode; stdcall;
var
b: TtsTextBlock;
begin


Yükleniyor…
İptal
Kaydet