Page MenuHome

py_draw_large_text.txt

py_draw_large_text.txt

Index: source/blender/python/api2_2x/Draw.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Draw.c,v
retrieving revision 1.34
diff -u -p -r1.34 Draw.c
--- source/blender/python/api2_2x/Draw.c 19 Mar 2005 21:08:11 -0000 1.34
+++ source/blender/python/api2_2x/Draw.c 20 Apr 2005 22:16:41 -0000
@@ -1062,13 +1062,15 @@ static PyObject *Method_GetStringWidth(
if( !strcmp( font_str, "normal" ) )
font = ( &G )->font;
+ else if( !strcmp( font_str, "large" ) )
+ font = BMF_GetFont(BMF_kScreen15);
else if( !strcmp( font_str, "small" ) )
font = ( &G )->fonts;
else if( !strcmp( font_str, "tiny" ) )
font = ( &G )->fontss;
else
return EXPP_ReturnPyObjError( PyExc_AttributeError,
- "\"font\" must be: 'normal' (default), 'small' or 'tiny'." );
+ "\"font\" must be: 'normal' (default), 'large', 'small' or 'tiny'." );
width = PyInt_FromLong( BMF_GetStringWidth( font, text ) );
@@ -1091,6 +1093,8 @@ static PyObject *Method_Text( PyObject *
if( !font_str )
font = ( &G )->font;
+ else if( !strcmp( font_str, "large" ) )
+ font = BMF_GetFont(BMF_kScreen15);
else if( !strcmp( font_str, "normal" ) )
font = ( &G )->font;
else if( !strcmp( font_str, "small" ) )
@@ -1099,7 +1103,7 @@ static PyObject *Method_Text( PyObject *
font = ( &G )->fontss;
else
return EXPP_ReturnPyObjError( PyExc_AttributeError,
- "\"font\" must be: 'normal' (default), 'small' or 'tiny'." );
+ "\"font\" must be: 'normal' (default), 'large', 'small' or 'tiny'." );
BMF_DrawString( font, text );
Index: source/blender/python/api2_2x/doc/Draw.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Draw.py,v
retrieving revision 1.15
diff -u -p -r1.15 Draw.py
--- source/blender/python/api2_2x/doc/Draw.py 16 Apr 2005 05:25:42 -0000 1.15
+++ source/blender/python/api2_2x/doc/Draw.py 20 Apr 2005 22:16:41 -0000
@@ -594,7 +594,7 @@ def GetStringWidth(string, fontsize = 'n
@type string: string
@param string: A string.
@type fontsize: string
- @param fontsize: The size of the font: 'normal', 'small' or 'tiny'.
+ @param fontsize: The size of the font: 'large', 'normal', 'small' or 'tiny'.
@rtype: int
@return: The width of I{string} with the chosen I{fontsize}.
"""
@@ -605,7 +605,7 @@ def Text(string, fontsize = 'normal'):
@type string: string
@param string: The text string to draw.
@type fontsize: string
- @param fontsize: The size of the font: 'normal', 'small' or 'tiny'.
+ @param fontsize: The size of the font: 'large', 'normal', 'small' or 'tiny'.
@rtype: int
@return: The width of I{string} drawn with the chosen I{fontsize}.
"""

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
38/cc/82e0b345435a58a2574d9f370e90

Event Timeline