Skip to content

Commit

Permalink
[gdi,graphics] fix glyph bounds #9454
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Nov 29, 2023
1 parent 85b5d7e commit df8e7a2
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions libfreerdp/gdi/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,21 +369,6 @@ static BOOL gdi_Glyph_Draw(rdpContext* context, const rdpGlyph* glyph, INT32 x,
return rc;
}

static BOOL gdi_Glyph_SetBounds(rdpContext* context, INT32 x, INT32 y, INT32 width, INT32 height)
{
rdpGdi* gdi;

if (!context || !context->gdi)
return FALSE;

gdi = context->gdi;

if (!gdi->drawing || !gdi->drawing->hdc)
return FALSE;

return gdi_SetClipRgn(gdi->drawing->hdc, x, y, width, height);
}

static BOOL gdi_Glyph_BeginDraw(rdpContext* context, INT32 x, INT32 y, INT32 width, INT32 height,
UINT32 bgcolor, UINT32 fgcolor, BOOL fOpRedundant)
{
Expand Down Expand Up @@ -458,8 +443,8 @@ static BOOL gdi_Glyph_EndDraw(rdpContext* context, INT32 x, INT32 y, INT32 width
/* Graphics Module */
BOOL gdi_register_graphics(rdpGraphics* graphics)
{
rdpBitmap bitmap;
rdpGlyph glyph;
rdpBitmap bitmap = { 0 };
rdpGlyph glyph = { 0 };
bitmap.size = sizeof(gdiBitmap);
bitmap.New = gdi_Bitmap_New;
bitmap.Free = gdi_Bitmap_Free;
Expand All @@ -473,7 +458,6 @@ BOOL gdi_register_graphics(rdpGraphics* graphics)
glyph.Draw = gdi_Glyph_Draw;
glyph.BeginDraw = gdi_Glyph_BeginDraw;
glyph.EndDraw = gdi_Glyph_EndDraw;
glyph.SetBounds = gdi_Glyph_SetBounds;
graphics_register_glyph(graphics, &glyph);
return TRUE;
}

0 comments on commit df8e7a2

Please sign in to comment.