1 2 // Copyright Michael D. Parker 2018. 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 module bindbc.freetype.bind.ftoutln; 8 9 import bindbc.freetype.bind.freetype, 10 bindbc.freetype.bind.ftimage, 11 bindbc.freetype.bind.fttypes; 12 13 alias FT_Orientation = int; 14 enum { 15 FT_ORIENTATION_TRUETYPE = 0, 16 FT_ORIENTATION_POSTSCRIPT = 1, 17 FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, 18 FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT 19 } 20 21 version(BindFT_Static) { 22 extern(C) @nogc nothrow { 23 FT_Error FT_Outline_Decompose(FT_Outline*,const(FT_Outline_Funcs)*,void*); 24 FT_Error FT_Outline_New(FT_Library,FT_UInt,FT_Int,FT_Outline*); 25 FT_Error FT_Outline_Done(FT_Library,FT_Outline*); 26 FT_Error FT_Outline_Check(FT_Outline*); 27 void FT_Outline_Get_CBox(const(FT_Outline)*,FT_BBox*); 28 void FT_Outline_Translate(const(FT_Outline)*,FT_Pos,FT_Pos); 29 FT_Error FT_Outline_Copy(const(FT_Outline)*,FT_Outline*); 30 void FT_Outline_Transform(const(FT_Outline)*,const(FT_Matrix)*); 31 FT_Error FT_Outline_Embolden(FT_Outline*,FT_Pos); 32 FT_Error FT_Outline_EmboldenXY(FT_Outline*,FT_Pos,FT_Pos); 33 void FT_Outline_Reverse(FT_Outline*); 34 FT_Error FT_Outline_Get_Bitmap(FT_Library,FT_Outline*,const(FT_Bitmap)*); 35 FT_Error FT_Outline_Render(FT_Library,FT_Outline*,FT_Raster_Params*); 36 FT_Orientation FT_Outline_Get_Orientation(FT_Outline*); 37 } 38 } 39 else { 40 extern(C) @nogc nothrow { 41 alias pFT_Outline_Decompose = FT_Error function(FT_Outline*,const(FT_Outline_Funcs)*,void*); 42 alias pFT_Outline_New = FT_Error function(FT_Library,FT_UInt,FT_Int,FT_Outline*); 43 alias pFT_Outline_Done = FT_Error function(FT_Library,FT_Outline*); 44 alias pFT_Outline_Check = FT_Error function(FT_Outline*); 45 alias pFT_Outline_Get_CBox = void function(const(FT_Outline)*,FT_BBox*); 46 alias pFT_Outline_Translate = void function(const(FT_Outline)*,FT_Pos,FT_Pos); 47 alias pFT_Outline_Copy = FT_Error function(const(FT_Outline)*,FT_Outline*); 48 alias pFT_Outline_Transform = void function(const(FT_Outline)*,const(FT_Matrix)*); 49 alias pFT_Outline_Embolden = FT_Error function(FT_Outline*,FT_Pos); 50 alias pFT_Outline_EmboldenXY = FT_Error function(FT_Outline*,FT_Pos,FT_Pos); 51 alias pFT_Outline_Reverse = void function(FT_Outline*); 52 alias pFT_Outline_Get_Bitmap = FT_Error function(FT_Library,FT_Outline*,const(FT_Bitmap)*); 53 alias pFT_Outline_Render = FT_Error function(FT_Library,FT_Outline*,FT_Raster_Params*); 54 alias pFT_Outline_Get_Orientation = FT_Orientation function(FT_Outline*); 55 } 56 57 __gshared { 58 pFT_Outline_Decompose FT_Outline_Decompose; 59 pFT_Outline_New FT_Outline_New; 60 pFT_Outline_Done FT_Outline_Done; 61 pFT_Outline_Check FT_Outline_Check; 62 pFT_Outline_Get_CBox FT_Outline_Get_CBox; 63 pFT_Outline_Translate FT_Outline_Translate; 64 pFT_Outline_Copy FT_Outline_Copy; 65 pFT_Outline_Transform FT_Outline_Transform; 66 pFT_Outline_Embolden FT_Outline_Embolden; 67 pFT_Outline_EmboldenXY FT_Outline_EmboldenXY; 68 pFT_Outline_Reverse FT_Outline_Reverse; 69 pFT_Outline_Get_Bitmap FT_Outline_Get_Bitmap; 70 pFT_Outline_Render FT_Outline_Render; 71 pFT_Outline_Get_Orientation FT_Outline_Get_Orientation; 72 } 73 }