| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <title>Skia: include/core/SkStroke.h Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <!-- Generated by Doxygen 1.6.1 --> |
| <div class="navigation" id="top"> |
| <div class="tabs"> |
| <ul> |
| <li><a href="main.html"><span>Main Page</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li><a href="annotated.html"><span>Classes</span></a></li> |
| <li class="current"><a href="files.html"><span>Files</span></a></li> |
| </ul> |
| </div> |
| <div class="tabs"> |
| <ul> |
| <li><a href="files.html"><span>File List</span></a></li> |
| <li><a href="globals.html"><span>File Members</span></a></li> |
| </ul> |
| </div> |
| <h1>include/core/SkStroke.h</h1><a href="_sk_stroke_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
| <a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2006 The Android Open Source Project</span> |
| <a name="l00003"></a>00003 <span class="comment"> *</span> |
| <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> |
| <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> |
| <a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span> |
| <a name="l00007"></a>00007 <span class="comment"> *</span> |
| <a name="l00008"></a>00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> |
| <a name="l00009"></a>00009 <span class="comment"> *</span> |
| <a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> |
| <a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> |
| <a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> |
| <a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span> |
| <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span> |
| <a name="l00015"></a>00015 <span class="comment"> */</span> |
| <a name="l00016"></a>00016 |
| <a name="l00017"></a>00017 <span class="preprocessor">#ifndef SkStroke_DEFINED</span> |
| <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define SkStroke_DEFINED</span> |
| <a name="l00019"></a>00019 <span class="preprocessor"></span> |
| <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="_sk_point_8h.html">SkPoint.h</a>"</span> |
| <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="_sk_paint_8h.html">SkPaint.h</a>"</span> |
| <a name="l00022"></a>00022 |
| <a name="l00023"></a>00023 <span class="keyword">struct </span><a class="code" href="struct_sk_rect.html">SkRect</a>; |
| <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="class_sk_path.html">SkPath</a>; |
| <a name="l00025"></a>00025 |
| <a name="l00026"></a><a class="code" href="_sk_stroke_8h.html#a705aafc5cfde04a44c76602b1047eec6">00026</a> <span class="preprocessor">#define SK_DefaultStrokeWidth SK_Scalar1</span> |
| <a name="l00027"></a><a class="code" href="_sk_stroke_8h.html#a5ec38387f569a387d3a85b3bd9154ce0">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define SK_DefaultMiterLimit SkIntToScalar(4)</span> |
| <a name="l00028"></a>00028 <span class="preprocessor"></span> |
| <a name="l00029"></a>00029 |
| <a name="l00036"></a><a class="code" href="class_sk_stroke.html">00036</a> <span class="keyword">class </span><a class="code" href="class_sk_stroke.html">SkStroke</a> { |
| <a name="l00037"></a>00037 <span class="keyword">public</span>: |
| <a name="l00038"></a>00038 <a class="code" href="class_sk_stroke.html#a44e2a9677643b3e846499f0b8bebe026">SkStroke</a>(); |
| <a name="l00039"></a>00039 <a class="code" href="class_sk_stroke.html#a44e2a9677643b3e846499f0b8bebe026">SkStroke</a>(<span class="keyword">const</span> <a class="code" href="class_sk_paint.html">SkPaint</a>&); |
| <a name="l00040"></a>00040 <a class="code" href="class_sk_stroke.html#a44e2a9677643b3e846499f0b8bebe026">SkStroke</a>(<span class="keyword">const</span> <a class="code" href="class_sk_paint.html">SkPaint</a>&, <a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> width); <span class="comment">// width overrides paint.getStrokeWidth()</span> |
| <a name="l00041"></a>00041 |
| <a name="l00042"></a><a class="code" href="class_sk_stroke.html#ae690ade6f664010e520795fa54398de2">00042</a> <a class="code" href="class_sk_paint.html#a0f78de8559b795defba93171f6cb6333">SkPaint::Cap</a> <a class="code" href="class_sk_stroke.html#ae690ade6f664010e520795fa54398de2">getCap</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="class_sk_paint.html#a0f78de8559b795defba93171f6cb6333">SkPaint::Cap</a>)fCap; } |
| <a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#a79bd77d13ac8434abd8c3436106b91f6">setCap</a>(<a class="code" href="class_sk_paint.html#a0f78de8559b795defba93171f6cb6333">SkPaint::Cap</a>); |
| <a name="l00044"></a>00044 |
| <a name="l00045"></a><a class="code" href="class_sk_stroke.html#afcc15020aa3cfc2794708ada9c421573">00045</a> <a class="code" href="class_sk_paint.html#ad5ca723b9c5d7097455b0e3c30259616">SkPaint::Join</a> <a class="code" href="class_sk_stroke.html#afcc15020aa3cfc2794708ada9c421573">getJoin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="class_sk_paint.html#ad5ca723b9c5d7097455b0e3c30259616">SkPaint::Join</a>)fJoin; } |
| <a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#aa6308d488bab294dc2638665a25c7bb0">setJoin</a>(<a class="code" href="class_sk_paint.html#ad5ca723b9c5d7097455b0e3c30259616">SkPaint::Join</a>); |
| <a name="l00047"></a>00047 |
| <a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#af236877a493e3ecdfc38786ff5776eb2">setMiterLimit</a>(<a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>); |
| <a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#a42609ccaaaaeb1de77fbf6f8619288ba">setWidth</a>(<a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>); |
| <a name="l00050"></a>00050 |
| <a name="l00051"></a><a class="code" href="class_sk_stroke.html#ab7922f0376642c4a684c15db116e2e04">00051</a> <span class="keywordtype">bool</span> <a class="code" href="class_sk_stroke.html#ab7922f0376642c4a684c15db116e2e04">getDoFill</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="_sk_types_8h.html#a103878b742d19374f6e93f301ad6d45c">SkToBool</a>(fDoFill); } |
| <a name="l00052"></a><a class="code" href="class_sk_stroke.html#aa2b06e5694bc9a89a832e7b848ad9f6c">00052</a> <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#aa2b06e5694bc9a89a832e7b848ad9f6c">setDoFill</a>(<span class="keywordtype">bool</span> doFill) { fDoFill = <a class="code" href="_sk_types_8h.html#a321b466227d136b435279ffa0fd5564e">SkToU8</a>(doFill); } |
| <a name="l00053"></a>00053 |
| <a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#a9f4346f3c07e08d28a5d5c11aa0a7993">strokeLine</a>(<span class="keyword">const</span> <a class="code" href="struct_sk_point.html">SkPoint</a>& start, <span class="keyword">const</span> <a class="code" href="struct_sk_point.html">SkPoint</a>& end, <a class="code" href="class_sk_path.html">SkPath</a>*) <span class="keyword">const</span>; |
| <a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#ab9439c4aae8f98922a7710dafa09f7d7">strokeRect</a>(<span class="keyword">const</span> <a class="code" href="struct_sk_rect.html">SkRect</a>& rect, <a class="code" href="class_sk_path.html">SkPath</a>*) <span class="keyword">const</span>; |
| <a name="l00056"></a>00056 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#ac02b3c68e690b18226bf1a4357d7f214">strokeOval</a>(<span class="keyword">const</span> <a class="code" href="struct_sk_rect.html">SkRect</a>& oval, <a class="code" href="class_sk_path.html">SkPath</a>*) <span class="keyword">const</span>; |
| <a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#a71db8af7cff324399c43f08af0f7c7c1">strokeRRect</a>(<span class="keyword">const</span> <a class="code" href="struct_sk_rect.html">SkRect</a>& rect, <a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> rx, <a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> ry, <a class="code" href="class_sk_path.html">SkPath</a>*) <span class="keyword">const</span>; |
| <a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="class_sk_stroke.html#a41491b92fd7fe3bb2193b6b8d5f4975f">strokePath</a>(<span class="keyword">const</span> <a class="code" href="class_sk_path.html">SkPath</a>& path, <a class="code" href="class_sk_path.html">SkPath</a>*) <span class="keyword">const</span>; |
| <a name="l00059"></a>00059 |
| <a name="l00061"></a>00061 |
| <a name="l00062"></a>00062 <span class="keyword">private</span>: |
| <a name="l00063"></a>00063 <a class="code" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> fWidth, fMiterLimit; |
| <a name="l00064"></a>00064 uint8_t fCap, fJoin; |
| <a name="l00065"></a>00065 <a class="code" href="_sk_types_8h.html#a6c7dec5c0a40866075ef185dd7a3eb42">SkBool8</a> fDoFill; |
| <a name="l00066"></a>00066 |
| <a name="l00067"></a><a class="code" href="class_sk_stroke.html#abe27c57b528bf869dac93f0edc35cdf5">00067</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sk_paint.html">SkPaint</a>; |
| <a name="l00068"></a>00068 }; |
| <a name="l00069"></a>00069 |
| <a name="l00070"></a>00070 <span class="preprocessor">#endif</span> |
| <a name="l00071"></a>00071 <span class="preprocessor"></span> |
| </pre></div></div> |
| <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Oct 20 11:03:40 2009 for Skia by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
| </body> |
| </html> |