2011-10-21 01:28:59 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-10-21 01:28:59 +04:00
|
|
|
* Graphical Objects
|
|
|
|
*
|
|
|
|
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2012-08-15 01:09:01 +04:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2012-11-22 05:21:08 +04:00
|
|
|
#include <winpr/crt.h>
|
|
|
|
|
2014-09-15 11:01:05 +04:00
|
|
|
#include <freerdp/log.h>
|
2011-10-21 01:28:59 +04:00
|
|
|
#include <freerdp/gdi/dc.h>
|
2011-11-09 08:26:44 +04:00
|
|
|
#include <freerdp/gdi/brush.h>
|
|
|
|
#include <freerdp/gdi/shape.h>
|
|
|
|
#include <freerdp/gdi/region.h>
|
2011-10-21 01:28:59 +04:00
|
|
|
#include <freerdp/gdi/bitmap.h>
|
2011-11-09 08:26:44 +04:00
|
|
|
#include <freerdp/gdi/drawing.h>
|
2011-10-21 01:28:59 +04:00
|
|
|
|
|
|
|
#include "graphics.h"
|
|
|
|
|
2014-09-15 11:01:05 +04:00
|
|
|
#define TAG FREERDP_TAG("gdi")
|
2011-11-09 21:16:09 +04:00
|
|
|
/* Bitmap Class */
|
|
|
|
|
2014-09-16 00:08:06 +04:00
|
|
|
HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int nWidth, int nHeight, int bpp, BYTE* data)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
2014-09-16 00:08:06 +04:00
|
|
|
int nSrcStep;
|
|
|
|
int nDstStep;
|
|
|
|
BYTE* pSrcData;
|
|
|
|
BYTE* pDstData;
|
|
|
|
UINT32 SrcFormat;
|
|
|
|
int bytesPerPixel;
|
2011-10-21 01:28:59 +04:00
|
|
|
HGDI_BITMAP bitmap;
|
|
|
|
|
2014-09-16 00:08:06 +04:00
|
|
|
nDstStep = nWidth * gdi->bytesPerPixel;
|
|
|
|
pDstData = _aligned_malloc(nHeight * nDstStep, 16);
|
|
|
|
|
|
|
|
if (!pDstData)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
pSrcData = data;
|
|
|
|
|
|
|
|
switch (bpp)
|
|
|
|
{
|
|
|
|
case 32:
|
|
|
|
bytesPerPixel = 4;
|
|
|
|
SrcFormat = PIXEL_FORMAT_XRGB32;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 24:
|
|
|
|
bytesPerPixel = 3;
|
|
|
|
SrcFormat = PIXEL_FORMAT_RGB24;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 16:
|
|
|
|
bytesPerPixel = 2;
|
|
|
|
SrcFormat = PIXEL_FORMAT_RGB565;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 15:
|
|
|
|
bytesPerPixel = 2;
|
|
|
|
SrcFormat = PIXEL_FORMAT_RGB555;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 8:
|
|
|
|
bytesPerPixel = 1;
|
|
|
|
SrcFormat = PIXEL_FORMAT_RGB8;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
SrcFormat = PIXEL_FORMAT_RGB565;
|
|
|
|
bytesPerPixel = 2;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
nSrcStep = nWidth * bytesPerPixel;
|
|
|
|
|
|
|
|
freerdp_image_copy(pDstData, gdi->format, nDstStep, 0, 0,
|
2014-09-18 02:30:09 +04:00
|
|
|
nWidth, nHeight, pSrcData, SrcFormat, nSrcStep, 0, 0, gdi->palette);
|
2014-09-16 00:08:06 +04:00
|
|
|
|
|
|
|
bitmap = gdi_CreateBitmap(nWidth, nHeight, gdi->dstBpp, pDstData);
|
2011-10-21 01:28:59 +04:00
|
|
|
|
|
|
|
return bitmap;
|
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
|
|
|
gdiBitmap* gdi_bitmap;
|
|
|
|
rdpGdi* gdi = context->gdi;
|
|
|
|
|
|
|
|
gdi_bitmap = (gdiBitmap*) bitmap;
|
|
|
|
gdi_bitmap->hdc = gdi_CreateCompatibleDC(gdi->hdc);
|
2015-04-26 23:28:49 +03:00
|
|
|
if (!gdi_bitmap->hdc)
|
2015-04-14 11:14:23 +03:00
|
|
|
return FALSE;
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2014-07-08 23:07:19 +04:00
|
|
|
if (!bitmap->data)
|
2011-10-21 01:28:59 +04:00
|
|
|
gdi_bitmap->bitmap = gdi_CreateCompatibleBitmap(gdi->hdc, bitmap->width, bitmap->height);
|
|
|
|
else
|
2014-09-17 22:55:52 +04:00
|
|
|
gdi_bitmap->bitmap = gdi_create_bitmap(gdi, bitmap->width, bitmap->height, bitmap->bpp, bitmap->data);
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
if (!gdi_bitmap->bitmap)
|
|
|
|
{
|
2015-05-08 22:39:23 +03:00
|
|
|
gdi_DeleteDC(gdi_bitmap->hdc);
|
2015-04-14 11:14:23 +03:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2015-04-26 23:28:49 +03:00
|
|
|
gdi_SelectObject(gdi_bitmap->hdc, (HGDIOBJECT) gdi_bitmap->bitmap);
|
2011-10-21 01:28:59 +04:00
|
|
|
gdi_bitmap->org_bitmap = NULL;
|
2015-04-14 11:14:23 +03:00
|
|
|
return TRUE;
|
2011-10-21 01:28:59 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void gdi_Bitmap_Free(rdpContext* context, rdpBitmap* bitmap)
|
|
|
|
{
|
|
|
|
gdiBitmap* gdi_bitmap = (gdiBitmap*) bitmap;
|
|
|
|
|
2014-07-08 23:07:19 +04:00
|
|
|
if (gdi_bitmap)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
|
|
|
gdi_SelectObject(gdi_bitmap->hdc, (HGDIOBJECT) gdi_bitmap->org_bitmap);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) gdi_bitmap->bitmap);
|
|
|
|
gdi_DeleteDC(gdi_bitmap->hdc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
2011-10-21 05:34:55 +04:00
|
|
|
int width, height;
|
2011-10-21 01:28:59 +04:00
|
|
|
gdiBitmap* gdi_bitmap = (gdiBitmap*) bitmap;
|
|
|
|
|
2011-10-21 05:34:55 +04:00
|
|
|
width = bitmap->right - bitmap->left + 1;
|
|
|
|
height = bitmap->bottom - bitmap->top + 1;
|
|
|
|
|
2015-06-26 15:32:38 +03:00
|
|
|
return gdi_BitBlt(context->gdi->primary->hdc, bitmap->left, bitmap->top,
|
|
|
|
width, height, gdi_bitmap->hdc, 0, 0, GDI_SRCCOPY);
|
2011-10-21 01:28:59 +04:00
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE* data, int width, int height, int bpp, int length,
|
2014-02-13 20:59:05 +04:00
|
|
|
BOOL compressed, int codecId)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
2014-09-10 08:42:41 +04:00
|
|
|
int status;
|
2012-10-09 11:01:37 +04:00
|
|
|
UINT16 size;
|
2014-09-12 09:03:19 +04:00
|
|
|
BYTE* pSrcData;
|
|
|
|
BYTE* pDstData;
|
|
|
|
UINT32 SrcSize;
|
|
|
|
UINT32 SrcFormat;
|
|
|
|
UINT32 bytesPerPixel;
|
|
|
|
rdpGdi* gdi = context->gdi;
|
2014-09-10 08:42:41 +04:00
|
|
|
|
2014-09-12 09:03:19 +04:00
|
|
|
bytesPerPixel = (bpp + 7) / 8;
|
|
|
|
size = width * height * 4;
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2014-09-17 22:55:52 +04:00
|
|
|
bitmap->data = (BYTE*) _aligned_malloc(size, 16);
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2014-09-12 09:03:19 +04:00
|
|
|
pSrcData = data;
|
|
|
|
SrcSize = (UINT32) length;
|
|
|
|
pDstData = bitmap->data;
|
|
|
|
|
|
|
|
if (compressed)
|
2012-07-24 23:05:22 +04:00
|
|
|
{
|
2014-09-12 09:03:19 +04:00
|
|
|
if (bpp < 32)
|
|
|
|
{
|
2015-04-28 18:00:41 +03:00
|
|
|
if (!freerdp_client_codecs_prepare(gdi->codecs, FREERDP_CODEC_INTERLEAVED))
|
|
|
|
return FALSE;
|
2014-09-12 09:03:19 +04:00
|
|
|
|
|
|
|
status = interleaved_decompress(gdi->codecs->interleaved, pSrcData, SrcSize, bpp,
|
2014-09-18 02:30:09 +04:00
|
|
|
&pDstData, gdi->format, -1, 0, 0, width, height, gdi->palette);
|
2014-09-12 09:03:19 +04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-28 18:00:41 +03:00
|
|
|
if (!freerdp_client_codecs_prepare(gdi->codecs, FREERDP_CODEC_PLANAR))
|
|
|
|
return FALSE;
|
2014-09-12 09:03:19 +04:00
|
|
|
|
|
|
|
status = planar_decompress(gdi->codecs->planar, pSrcData, SrcSize, &pDstData,
|
2014-09-17 22:55:52 +04:00
|
|
|
gdi->format, -1, 0, 0, width, height, TRUE);
|
2014-09-12 09:03:19 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (status < 0)
|
|
|
|
{
|
2014-09-12 16:36:29 +04:00
|
|
|
WLog_ERR(TAG, "Bitmap Decompression Failed");
|
2015-04-14 11:14:23 +03:00
|
|
|
return FALSE;
|
2014-09-12 09:03:19 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SrcFormat = gdi_get_pixel_format(bpp, TRUE);
|
|
|
|
|
2014-09-17 22:55:52 +04:00
|
|
|
status = freerdp_image_copy(pDstData, gdi->format, -1, 0, 0,
|
2014-09-18 02:30:09 +04:00
|
|
|
width, height, pSrcData, SrcFormat, -1, 0, 0, gdi->palette);
|
2011-10-21 01:28:59 +04:00
|
|
|
}
|
|
|
|
|
2012-10-09 10:31:28 +04:00
|
|
|
bitmap->compressed = FALSE;
|
2011-10-21 01:28:59 +04:00
|
|
|
bitmap->length = size;
|
2014-09-17 22:55:52 +04:00
|
|
|
bitmap->bpp = gdi->dstBpp;
|
2015-04-14 11:14:23 +03:00
|
|
|
return TRUE;
|
2011-10-21 01:28:59 +04:00
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary)
|
2011-10-21 02:18:45 +04:00
|
|
|
{
|
|
|
|
rdpGdi* gdi = context->gdi;
|
|
|
|
|
|
|
|
if (primary)
|
|
|
|
gdi->drawing = gdi->primary;
|
|
|
|
else
|
|
|
|
gdi->drawing = (gdiBitmap*) bitmap;
|
2015-04-14 11:14:23 +03:00
|
|
|
|
|
|
|
return TRUE;
|
2011-10-21 02:18:45 +04:00
|
|
|
}
|
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
/* Glyph Class */
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Glyph_New(rdpContext* context, rdpGlyph* glyph)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE* data;
|
2011-11-09 08:26:44 +04:00
|
|
|
gdiGlyph* gdi_glyph;
|
|
|
|
|
|
|
|
gdi_glyph = (gdiGlyph*) glyph;
|
|
|
|
|
|
|
|
gdi_glyph->hdc = gdi_GetDC();
|
2015-04-14 11:14:23 +03:00
|
|
|
if (!gdi_glyph->hdc)
|
|
|
|
return FALSE;
|
2011-11-09 08:26:44 +04:00
|
|
|
gdi_glyph->hdc->bytesPerPixel = 1;
|
|
|
|
gdi_glyph->hdc->bitsPerPixel = 1;
|
|
|
|
|
|
|
|
data = freerdp_glyph_convert(glyph->cx, glyph->cy, glyph->aj);
|
2015-04-14 11:14:23 +03:00
|
|
|
if (!data)
|
|
|
|
{
|
|
|
|
gdi_DeleteDC(gdi_glyph->hdc);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2011-11-09 08:26:44 +04:00
|
|
|
gdi_glyph->bitmap = gdi_CreateBitmap(glyph->cx, glyph->cy, 1, data);
|
2015-04-14 11:14:23 +03:00
|
|
|
if (!gdi_glyph->bitmap)
|
|
|
|
{
|
|
|
|
gdi_DeleteDC(gdi_glyph->hdc);
|
|
|
|
_aligned_free(data);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2011-11-09 08:26:44 +04:00
|
|
|
gdi_glyph->bitmap->bytesPerPixel = 1;
|
|
|
|
gdi_glyph->bitmap->bitsPerPixel = 1;
|
|
|
|
|
2015-04-26 23:28:49 +03:00
|
|
|
gdi_SelectObject(gdi_glyph->hdc, (HGDIOBJECT) gdi_glyph->bitmap);
|
2011-11-09 08:26:44 +04:00
|
|
|
gdi_glyph->org_bitmap = NULL;
|
2015-04-14 11:14:23 +03:00
|
|
|
return TRUE;
|
2011-11-09 08:26:44 +04:00
|
|
|
}
|
|
|
|
|
2011-11-09 09:43:56 +04:00
|
|
|
void gdi_Glyph_Free(rdpContext* context, rdpGlyph* glyph)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
|
|
|
gdiGlyph* gdi_glyph;
|
|
|
|
|
|
|
|
gdi_glyph = (gdiGlyph*) glyph;
|
|
|
|
|
2014-07-08 23:07:19 +04:00
|
|
|
if (gdi_glyph)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
|
|
|
gdi_SelectObject(gdi_glyph->hdc, (HGDIOBJECT) gdi_glyph->org_bitmap);
|
|
|
|
gdi_DeleteObject((HGDIOBJECT) gdi_glyph->bitmap);
|
|
|
|
gdi_DeleteDC(gdi_glyph->hdc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
|
|
|
gdiGlyph* gdi_glyph;
|
|
|
|
rdpGdi* gdi = context->gdi;
|
|
|
|
|
|
|
|
gdi_glyph = (gdiGlyph*) glyph;
|
|
|
|
|
2015-06-26 15:32:38 +03:00
|
|
|
return gdi_BitBlt(gdi->drawing->hdc, x, y, gdi_glyph->bitmap->width,
|
|
|
|
gdi_glyph->bitmap->height, gdi_glyph->hdc, 0, 0, GDI_DSPDxax);
|
2011-11-09 08:26:44 +04:00
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor, BOOL fOpRedundant)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
|
|
|
GDI_RECT rect;
|
|
|
|
HGDI_BRUSH brush;
|
|
|
|
rdpGdi* gdi = context->gdi;
|
2015-06-26 15:32:38 +03:00
|
|
|
BOOL ret = FALSE;
|
2011-11-09 08:26:44 +04:00
|
|
|
|
2014-10-29 22:56:26 +03:00
|
|
|
/* TODO: handle fOpRedundant! See xf_Glyph_BeginDraw() */
|
|
|
|
|
2014-09-18 02:30:09 +04:00
|
|
|
bgcolor = freerdp_convert_gdi_order_color(bgcolor, gdi->srcBpp, gdi->format, gdi->palette);
|
|
|
|
fgcolor = freerdp_convert_gdi_order_color(fgcolor, gdi->srcBpp, gdi->format, gdi->palette);
|
2011-11-09 08:26:44 +04:00
|
|
|
|
2015-06-26 15:32:38 +03:00
|
|
|
if (!(brush = gdi_CreateSolidBrush(fgcolor)))
|
|
|
|
goto out;
|
2015-04-14 11:14:23 +03:00
|
|
|
|
|
|
|
gdi_CRgnToRect(x, y, width, height, &rect);
|
|
|
|
ret = gdi_FillRect(gdi->drawing->hdc, &rect, brush);
|
2013-01-26 02:52:37 +04:00
|
|
|
gdi_DeleteObject((HGDIOBJECT) brush);
|
2011-11-09 21:57:31 +04:00
|
|
|
|
2015-06-26 15:32:38 +03:00
|
|
|
out:
|
2011-11-09 21:57:31 +04:00
|
|
|
gdi->textColor = gdi_SetTextColor(gdi->drawing->hdc, bgcolor);
|
2015-06-26 15:32:38 +03:00
|
|
|
return ret;
|
2011-11-09 08:26:44 +04:00
|
|
|
}
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor)
|
2011-11-09 08:26:44 +04:00
|
|
|
{
|
|
|
|
rdpGdi* gdi = context->gdi;
|
|
|
|
|
2014-09-18 02:30:09 +04:00
|
|
|
bgcolor = freerdp_convert_gdi_order_color(bgcolor, gdi->srcBpp, gdi->format, gdi->palette);
|
2011-11-09 08:26:44 +04:00
|
|
|
gdi->textColor = gdi_SetTextColor(gdi->drawing->hdc, bgcolor);
|
2015-04-14 11:14:23 +03:00
|
|
|
return TRUE;
|
2011-11-09 08:26:44 +04:00
|
|
|
}
|
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
/* Graphics Module */
|
|
|
|
|
2015-04-14 11:14:23 +03:00
|
|
|
BOOL gdi_register_graphics(rdpGraphics* graphics)
|
2011-10-21 01:28:59 +04:00
|
|
|
{
|
2011-11-09 21:16:09 +04:00
|
|
|
rdpBitmap* bitmap;
|
|
|
|
rdpGlyph* glyph;
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2014-02-13 20:59:05 +04:00
|
|
|
bitmap = (rdpBitmap*) calloc(1, sizeof(rdpBitmap));
|
|
|
|
|
|
|
|
if (!bitmap)
|
2015-04-14 11:14:23 +03:00
|
|
|
return FALSE;
|
2014-02-13 20:59:05 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
bitmap->size = sizeof(gdiBitmap);
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
bitmap->New = gdi_Bitmap_New;
|
|
|
|
bitmap->Free = gdi_Bitmap_Free;
|
|
|
|
bitmap->Paint = gdi_Bitmap_Paint;
|
|
|
|
bitmap->Decompress = gdi_Bitmap_Decompress;
|
|
|
|
bitmap->SetSurface = gdi_Bitmap_SetSurface;
|
2011-10-21 01:28:59 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
graphics_register_bitmap(graphics, bitmap);
|
2012-10-09 07:21:26 +04:00
|
|
|
free(bitmap);
|
2011-11-09 08:26:44 +04:00
|
|
|
|
2014-02-13 20:59:05 +04:00
|
|
|
glyph = (rdpGlyph*) calloc(1, sizeof(rdpGlyph));
|
|
|
|
|
|
|
|
if (!glyph)
|
2015-04-14 11:14:23 +03:00
|
|
|
return FALSE;
|
2014-02-13 20:59:05 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
glyph->size = sizeof(gdiGlyph);
|
2011-11-09 09:43:56 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
glyph->New = gdi_Glyph_New;
|
|
|
|
glyph->Free = gdi_Glyph_Free;
|
|
|
|
glyph->Draw = gdi_Glyph_Draw;
|
|
|
|
glyph->BeginDraw = gdi_Glyph_BeginDraw;
|
|
|
|
glyph->EndDraw = gdi_Glyph_EndDraw;
|
2011-11-09 08:26:44 +04:00
|
|
|
|
2011-11-09 21:16:09 +04:00
|
|
|
graphics_register_glyph(graphics, glyph);
|
2012-10-09 07:21:26 +04:00
|
|
|
free(glyph);
|
2015-04-14 11:14:23 +03:00
|
|
|
return TRUE;
|
2011-10-21 01:28:59 +04:00
|
|
|
}
|