public SDL2_GPU.GPU_Rect drawColumn(SDL2_GPU.GPU_Target_PTR dest, float x, float y, UInt16 width, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(x, y, 0, 0)); } return(SDL_FontCache.FC_DrawColumn(font, dest, x, y, width, formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect drawBox(SDL2_GPU.GPU_Target_PTR dest, ref SDL2_GPU.GPU_Rect box, AlignEnum align, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(box.x, box.y, 0, 0)); } return(SDL_FontCache.FC_DrawBoxAlign(font, dest, box, translate_enum_NFont_to_FC(align), formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect draw(SDL2_GPU.GPU_Target_PTR dest, float x, float y, ref SDL.SDL_Color color, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(x, y, 0, 0)); } return(SDL_FontCache.FC_DrawColor(font, dest, x, y, color, formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect drawBox(SDL2_GPU.GPU_Target_PTR dest, ref SDL2_GPU.GPU_Rect box, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(box.x, box.y, 0, 0)); } return(SDL_FontCache.FC_DrawBox(font, dest, box, formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect getCharacterOffset(UInt16 position_index, int column_width, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(0, 0, 0, 0)); } return(SDL_FontCache.FC_GetCharacterOffset(font, position_index, column_width, formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect draw(SDL2_GPU.GPU_Target_PTR dest, float x, float y, ref Scale scale, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(x, y, 0, 0)); } return(SDL_FontCache.FC_DrawScale(font, dest, x, y, SDL_FontCache.FC_MakeScale(scale.x, scale.y), formatted_text, __arglist())); }
public UInt16 getColumnHeight(UInt16 width, string formatted_text) { if (formatted_text == null) { return(0); } return(SDL_FontCache.FC_GetColumnHeight(font, width, formatted_text, __arglist())); }
public int getDescent(string formatted_text) { if (formatted_text == null) { return(SDL_FontCache.FC_GetDescent(font, null, __arglist())); } return(SDL_FontCache.FC_GetDescent(font, formatted_text, __arglist())); }
public UInt16 getWidth(string formatted_text) { if (formatted_text == null) { return(0); } return(SDL_FontCache.FC_GetWidth(font, formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect drawColumn(SDL2_GPU.GPU_Target_PTR dest, float x, float y, UInt16 width, AlignEnum align, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(x, y, 0, 0)); } return(SDL_FontCache.FC_DrawColumnAlign(font, dest, x, y, width, translate_enum_NFont_to_FC(align), formatted_text, __arglist())); }
public bool load(IntPtr ttf, SDL.SDL_Color color) { if (ttf == null) { return(false); } SDL_FontCache.FC_ClearFont(font); return(SDL_FontCache.FC_LoadFontFromTTF(font, ttf, color) != 0); }
public SDL2_GPU.GPU_Rect drawBox(SDL2_GPU.GPU_Target_PTR dest, ref SDL2_GPU.GPU_Rect box, ref Effect effect, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(box.x, box.y, 0, 0)); } return(SDL_FontCache.FC_DrawBoxEffect(font, dest, box, SDL_FontCache.FC_MakeEffect( translate_enum_NFont_to_FC(effect.alignment), SDL_FontCache.FC_MakeScale(effect.scale.x, effect.scale.y), effect.color), formatted_text, __arglist())); }
public SDL2_GPU.GPU_Rect drawColumn(SDL2_GPU.GPU_Target_PTR dest, float x, float y, UInt16 width, ref Effect effect, string formatted_text) { if (formatted_text == null) { return(SDL2_GPU.GPU_MakeRect(x, y, 0, 0)); } return(SDL_FontCache.FC_DrawColumnEffect(font, dest, x, y, width, SDL_FontCache.FC_MakeEffect( translate_enum_NFont_to_FC(effect.alignment), SDL_FontCache.FC_MakeScale(effect.scale.x, effect.scale.y), effect.color), formatted_text, __arglist())); }
public SDL.SDL_Color getDefaultColor() { return(SDL_FontCache.FC_GetDefaultColor(font)); }
public bool load(IntPtr ttf) { return(load(ttf, SDL_FontCache.FC_GetDefaultColor(font))); }
public UInt16 getMaxWidth() { return(SDL_FontCache.FC_GetMaxWidth(font)); }
public int getDescent() { return(SDL_FontCache.FC_GetDescent(font, null, __arglist())); }
public int getDescent(char character) { return(SDL_FontCache.FC_GetDescent(font, "%c", __arglist(character))); }
public int getLineSpacing() { return(SDL_FontCache.FC_GetLineSpacing(font)); }
public int getBaseline() { return(SDL_FontCache.FC_GetBaseline(font)); }
public bool load(string filename_ttf, UInt32 pointSize, SDL.SDL_Color color, int style = SDL_ttf.TTF_STYLE_NORMAL) { SDL_FontCache.FC_ClearFont(font); return(SDL_FontCache.FC_LoadFont(font, filename_ttf, (int)pointSize, color, style) != 0); }
public void free() { SDL_FontCache.FC_ClearFont(font); }
// Setters public void setSpacing(int LetterSpacing) { SDL_FontCache.FC_SetSpacing(font, LetterSpacing); }
// Loading public void setLoadingString(string str) { SDL_FontCache.FC_SetLoadingString(font, str); }
public void setDefaultColor(ref SDL.SDL_Color color) { SDL_FontCache.FC_SetDefaultColor(font, color); }
public void setLineSpacing(int LineSpacing) { SDL_FontCache.FC_SetLineSpacing(font, LineSpacing); }
// Getters // public GPU_Image_PTR getImage(); // public IntPtr getSurface(); public UInt16 getHeight() { return(SDL_FontCache.FC_GetLineHeight(font)); }
private void init() // Common constructor { font = SDL_FontCache.FC_CreateFont(); }
public NFont(IntPtr ttf) { init(); load(ttf, SDL_FontCache.FC_GetDefaultColor(font)); }