RaspRasterize

NTSTATUS __stdcall RaspRasterize(
        _TEXT_ATTRIBUTES *TextAttributes,
        WCHAR Character,
        UINT64 Flags,
        _GRAPHICS_RECTANGLE **CharacterBitmap,
        UINT64 *XExtent,
        INT64 *MaxRow,
        _BG_RASTERIZER_WORKSPACE *Workspace){
  _BG_RASTERIZER_WORKSPACE *v7; 
  __int64 v9; 
  NTSTATUS UnscaledGlyphData; 
  int v11; 
  __int64 v12; 
  int v13; 
  VOID *v14; 
  _BG_RASTERIZER_WORKSPACE v15; 
  VOID *v17; 
  VOID *Buffer; 
  _GLYPH_DATA *GlyphData; 
  int v20; 
  _BG_RASTERIZER_WORKSPACE *a8; 
  _BG_RASTERIZER_WORKSPACE *a9; 

  v7 = a9;
  v20 = 0;
  v17 = 0i64;
  v9 = *((_QWORD *)TextAttributes + 1);
  Buffer = 0i64;
  GlyphData = 0i64;
  UnscaledGlyphData = RaspGetUnscaledGlyphData(v9, Character, &GlyphData, &v20, a9);
  if( UnscaledGlyphData >= 0 )
  {
    UnscaledGlyphData = RaspScaleCoordinates(TextAttributes, GlyphData);
    if( UnscaledGlyphData >= 0 )
    {
      v11 = RaspCreatePointList((__int64)GlyphData, &Buffer, v7);
      v14 = Buffer;
      UnscaledGlyphData = v11;
      if( v11 >= 0 )
      {
        UnscaledGlyphData = RaspScanConvert(
                              (__int64)GlyphData,
                              (__int64)Buffer,
                              v12,
                              v13,
                              (int)XExtent,
                              (__int64)&v17,
                              (__int64)a8,
                              v7);
        if( UnscaledGlyphData < 0 )
        {
          if( v17 )
            RaspFreeMemory(v17, v7);
        }
        else
        {
          v15 = *((_DWORD *)v17 + 1) >> 2;
          *MaxRow = (INT64)v17;
          *Workspace = v15;
        }
      }
      if( v14 )
        RaspFreeMemory(v14, v7);
    }
  }
  if( GlyphData )
    RaspFreeMemory(GlyphData, v7);
  return UnscaledGlyphData;
}

Referenced by:

BgpRasPrintGlyph
RaspGetXExtent