blob: 1b1860995269b38669a43e7ba64456142cdb17c8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SGL: SkTextBox.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.0 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">include</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">skia</a></div>
<h1>SkTextBox.h</h1><div class="fragment"><pre class="fragment">00001 <span class="preprocessor">#ifndef SkTextBox_DEFINED</span>
00002 <span class="preprocessor"></span><span class="preprocessor">#define SkTextBox_DEFINED</span>
00003 <span class="preprocessor"></span>
00004 <span class="preprocessor">#include "SkCanvas.h"</span>
00005
<a name="l00017"></a><a class="code" href="classSkTextBox.html">00017</a> <span class="keyword">class </span><a class="code" href="classSkTextBox.html">SkTextBox</a> {
00018 <span class="keyword">public</span>:
00019 <a class="code" href="classSkTextBox.html">SkTextBox</a>();
00020
00021 <span class="keyword">enum</span> Mode {
00022 kOneLine_Mode,
00023 kLineBreak_Mode,
00024
00025 kModeCount
00026 };
00027 Mode getMode()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (Mode)fMode; }
00028 <span class="keywordtype">void</span> setMode(Mode);
00029
00030 <span class="keyword">enum</span> SpacingAlign {
00031 kStart_SpacingAlign,
00032 kCenter_SpacingAlign,
00033 kEnd_SpacingAlign,
00034
00035 kSpacingAlignCount
00036 };
00037 SpacingAlign getSpacingAlign()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (SpacingAlign)fSpacingAlign; }
00038 <span class="keywordtype">void</span> setSpacingAlign(SpacingAlign);
00039
00040 <span class="keywordtype">void</span> getBox(SkRect*) <span class="keyword">const</span>;
00041 <span class="keywordtype">void</span> setBox(<span class="keyword">const</span> SkRect&amp;);
00042 <span class="keywordtype">void</span> setBox(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom);
00043
00044 <span class="keywordtype">void</span> getSpacing(SkScalar* mul, SkScalar* add) <span class="keyword">const</span>;
00045 <span class="keywordtype">void</span> setSpacing(SkScalar mul, SkScalar add);
00046
00047 <span class="keywordtype">void</span> draw(<a class="code" href="classSkCanvas.html">SkCanvas</a>*, <span class="keyword">const</span> <span class="keywordtype">char</span> text[], size_t len, <span class="keyword">const</span> <a class="code" href="classSkPaint.html">SkPaint</a>&amp;);
00048
00049 <span class="keyword">private</span>:
00050 SkRect fBox;
00051 SkScalar fSpacingMul, fSpacingAdd;
00052 U8 fMode, fSpacingAlign;
00053 };
00054
00055 <span class="keyword">class </span>SkTextLineBreaker {
00056 <span class="keyword">public</span>:
00057 <span class="keyword">static</span> <span class="keywordtype">int</span> CountLines(<span class="keyword">const</span> <span class="keywordtype">char</span> text[], size_t len, <span class="keyword">const</span> <a class="code" href="classSkPaint.html">SkPaint</a>&amp;, SkScalar width);
00058 };
00059
00060 <span class="preprocessor">#endif</span>
00061 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue May 9 14:35:23 2006 for SGL by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.0 </small></address>
</body>
</html>