<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Chipmunk2D Pro API Reference: ChipmunkImageSampler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Chipmunk2D Pro API Reference
 <span id="projectnumber">7.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Instance Methods</a> |
<a href="#pub-static-methods">Class Methods</a> |
<a href="class_chipmunk_image_sampler-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ChipmunkImageSampler Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A CGBitmapContext sampler initialized with an CGImage.
<a href="interface_chipmunk_image_sampler.html#details">More...</a></p>
<p><code>#import <<a class="el" href="_chipmunk_image_sampler_8h_source.html">ChipmunkImageSampler.h</a>></code></p>
<p>Inherits <a class="el" href="interface_chipmunk_c_g_context_sampler.html">ChipmunkCGContextSampler</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:aebc6dff33612c59a306107071a4aa6f2"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_image_sampler.html#aebc6dff33612c59a306107071a4aa6f2">initWithImage:isMask:contextWidth:contextHeight:</a></td></tr>
<tr class="memdesc:aebc6dff33612c59a306107071a4aa6f2"><td class="mdescLeft"> </td><td class="mdescRight">Initialize an image sampler of a certain size with a CGImage. <a href="#aebc6dff33612c59a306107071a4aa6f2">More...</a><br/></td></tr>
<tr class="separator:aebc6dff33612c59a306107071a4aa6f2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a30f73913c4ca0118aee0d1a49423e8dc"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_image_sampler.html#a30f73913c4ca0118aee0d1a49423e8dc">initWithImageFile:isMask:</a></td></tr>
<tr class="memdesc:a30f73913c4ca0118aee0d1a49423e8dc"><td class="mdescLeft"> </td><td class="mdescRight">Initialize an image sampler with an image file. <a href="#a30f73913c4ca0118aee0d1a49423e8dc">More...</a><br/></td></tr>
<tr class="separator:a30f73913c4ca0118aee0d1a49423e8dc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_interface_chipmunk_c_g_context_sampler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_interface_chipmunk_c_g_context_sampler')"><img src="closed.png" alt="-"/> Instance Methods inherited from <a class="el" href="interface_chipmunk_c_g_context_sampler.html">ChipmunkCGContextSampler</a></td></tr>
<tr class="memitem:a60d99d43cd8cf5104fd3112ea71f4fcd inherit pub_methods_interface_chipmunk_c_g_context_sampler"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_c_g_context_sampler.html#a60d99d43cd8cf5104fd3112ea71f4fcd">initWithWidth:height:colorSpace:bitmapInfo:component:</a></td></tr>
<tr class="memdesc:a60d99d43cd8cf5104fd3112ea71f4fcd inherit pub_methods_interface_chipmunk_c_g_context_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Initialize a context based sampler. <a href="#a60d99d43cd8cf5104fd3112ea71f4fcd">More...</a><br/></td></tr>
<tr class="separator:a60d99d43cd8cf5104fd3112ea71f4fcd inherit pub_methods_interface_chipmunk_c_g_context_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_interface_chipmunk_bitmap_sampler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_interface_chipmunk_bitmap_sampler')"><img src="closed.png" alt="-"/> Instance Methods inherited from <a class="el" href="interface_chipmunk_bitmap_sampler.html">ChipmunkBitmapSampler</a></td></tr>
<tr class="memitem:a556e7e35a2005c72ba298a720e55c6d5 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memItemLeft" align="right" valign="top">(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_bitmap_sampler.html#a556e7e35a2005c72ba298a720e55c6d5">initWithWidth:height:stride:bytesPerPixel:component:flip:pixelData:</a></td></tr>
<tr class="memdesc:a556e7e35a2005c72ba298a720e55c6d5 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Init a sampler from bitmap data. <a href="#a556e7e35a2005c72ba298a720e55c6d5">More...</a><br/></td></tr>
<tr class="separator:a556e7e35a2005c72ba298a720e55c6d5 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45b3082d0360875fb26bf27b9533061e inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45b3082d0360875fb26bf27b9533061e"></a>
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_bitmap_sampler.html#a45b3082d0360875fb26bf27b9533061e">setBorderRepeat</a></td></tr>
<tr class="memdesc:a45b3082d0360875fb26bf27b9533061e inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Set the border of the bitmap to repeat the edge pixels. <br/></td></tr>
<tr class="separator:a45b3082d0360875fb26bf27b9533061e inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9bbeb6e93edb1352a428fda37e2b5645 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9bbeb6e93edb1352a428fda37e2b5645"></a>
(void) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_bitmap_sampler.html#a9bbeb6e93edb1352a428fda37e2b5645">setBorderValue:</a></td></tr>
<tr class="memdesc:a9bbeb6e93edb1352a428fda37e2b5645 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Set the border of the bitmap to be a specific value. <br/></td></tr>
<tr class="separator:a9bbeb6e93edb1352a428fda37e2b5645 inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4922ac253530316b598463efdb2a82b inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac4922ac253530316b598463efdb2a82b"></a>
(<a class="el" href="interface_chipmunk_polyline_set.html">ChipmunkPolylineSet</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_bitmap_sampler.html#ac4922ac253530316b598463efdb2a82b">marchAllWithBorder:hard:</a></td></tr>
<tr class="memdesc:ac4922ac253530316b598463efdb2a82b inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="mdescLeft"> </td><td class="mdescRight">March the entire image. <br/></td></tr>
<tr class="separator:ac4922ac253530316b598463efdb2a82b inherit pub_methods_interface_chipmunk_bitmap_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_interface_chipmunk_abstract_sampler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_interface_chipmunk_abstract_sampler')"><img src="closed.png" alt="-"/> Instance Methods inherited from <a class="el" href="interface_chipmunk_abstract_sampler.html">ChipmunkAbstractSampler</a></td></tr>
<tr class="memitem:ab02d0f11c24948ed66fd36bf914c38bb inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab02d0f11c24948ed66fd36bf914c38bb"></a>
(id) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_abstract_sampler.html#ab02d0f11c24948ed66fd36bf914c38bb">initWithSamplingFunction:</a></td></tr>
<tr class="memdesc:ab02d0f11c24948ed66fd36bf914c38bb inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Designated initializer. <br/></td></tr>
<tr class="separator:ab02d0f11c24948ed66fd36bf914c38bb inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c76740a14fd614be3da3148251ca6a5 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c76740a14fd614be3da3148251ca6a5"></a>
(<a class="el" href="group__basic_types.html#gac1ed65573e035bf892505768c852d8d3">cpFloat</a>) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_abstract_sampler.html#a5c76740a14fd614be3da3148251ca6a5">sample:</a></td></tr>
<tr class="memdesc:a5c76740a14fd614be3da3148251ca6a5 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="mdescLeft"> </td><td class="mdescRight">Sample at a specific point. <br/></td></tr>
<tr class="separator:a5c76740a14fd614be3da3148251ca6a5 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad5c78eb18accda360138e5cdd53f55a1 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5c78eb18accda360138e5cdd53f55a1"></a>
(<a class="el" href="interface_chipmunk_polyline_set.html">ChipmunkPolylineSet</a> *) </td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_chipmunk_abstract_sampler.html#ad5c78eb18accda360138e5cdd53f55a1">march:xSamples:ySamples:hard:</a></td></tr>
<tr class="memdesc:ad5c78eb18accda360138e5cdd53f55a1 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="mdescLeft"> </td><td class="mdescRight">March a certain area of the sampler. <br/></td></tr>
<tr class="separator:ad5c78eb18accda360138e5cdd53f55a1 inherit pub_methods_interface_chipmunk_abstract_sampler"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Class Methods</h2></td></tr>
<tr class="memitem:a84b93c6778e611c51171386768b8fd50"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84b93c6778e611c51171386768b8fd50"></a>
(CGImageRef) </td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_chipmunk_image_sampler.html#a84b93c6778e611c51171386768b8fd50">loadImage:</a></td></tr>
<tr class="memdesc:a84b93c6778e611c51171386768b8fd50"><td class="mdescLeft"> </td><td class="mdescRight">Helper method to easily load CGImageRefs by path. You are responsible for releasing the CGImage. <br/></td></tr>
<tr class="separator:a84b93c6778e611c51171386768b8fd50"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a927f8c0998e5329bde4e8de20980ecd0"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_chipmunk_image_sampler.html">ChipmunkImageSampler</a> *) </td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_chipmunk_image_sampler.html#a927f8c0998e5329bde4e8de20980ecd0">samplerWithImageFile:isMask:</a></td></tr>
<tr class="memdesc:a927f8c0998e5329bde4e8de20980ecd0"><td class="mdescLeft"> </td><td class="mdescRight">Return an autoreleased image sampler initialized with an image file. <a href="#a927f8c0998e5329bde4e8de20980ecd0">More...</a><br/></td></tr>
<tr class="separator:a927f8c0998e5329bde4e8de20980ecd0"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header properties_interface_chipmunk_c_g_context_sampler"><td colspan="2" onclick="javascript:toggleInherit('properties_interface_chipmunk_c_g_context_sampler')"><img src="closed.png" alt="-"/> Properties inherited from <a class="el" href="interface_chipmunk_c_g_context_sampler.html">ChipmunkCGContextSampler</a></td></tr>
<tr class="memitem:ae9cb14111d553d6765d9208385d46a55 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9cb14111d553d6765d9208385d46a55"></a>
CGContextRef </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_c_g_context_sampler.html#ae9cb14111d553d6765d9208385d46a55">context</a></td></tr>
<tr class="memdesc:ae9cb14111d553d6765d9208385d46a55 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="mdescLeft"> </td><td class="mdescRight">CGBitmapContext for this sampler. <br/></td></tr>
<tr class="separator:ae9cb14111d553d6765d9208385d46a55 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4fea6c7a723e31fea817f9784dcb8590 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4fea6c7a723e31fea817f9784dcb8590"></a>
NSMutableData * </td><td class="memItemRight" valign="bottom"><a class="el" href="interface_chipmunk_c_g_context_sampler.html#a4fea6c7a723e31fea817f9784dcb8590">pixelData</a></td></tr>
<tr class="memdesc:a4fea6c7a723e31fea817f9784dcb8590 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="mdescLeft"> </td><td class="mdescRight">NSMutableData object holding the pixel data. <br/></td></tr>
<tr class="separator:a4fea6c7a723e31fea817f9784dcb8590 inherit properties_interface_chipmunk_c_g_context_sampler"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A CGBitmapContext sampler initialized with an CGImage. </p>
</div><h2 class="groupheader">Method Documentation</h2>
<a class="anchor" id="aebc6dff33612c59a306107071a4aa6f2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) initWithImage: </td>
<td></td>
<td class="paramtype">(CGImageRef) </td>
<td class="paramname"><em>image</em></td>
</tr>
<tr>
<td class="paramkey">isMask:</td>
<td></td>
<td class="paramtype">(bool) </td>
<td class="paramname"><em>isMask</em></td>
</tr>
<tr>
<td class="paramkey">contextWidth:</td>
<td></td>
<td class="paramtype">(NSUInteger) </td>
<td class="paramname"><em>width</em></td>
</tr>
<tr>
<td class="paramkey">contextHeight:</td>
<td></td>
<td class="paramtype">(NSUInteger) </td>
<td class="paramname"><em>height</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize an image sampler of a certain size with a CGImage. </p>
<p>If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded. </p>
</div>
</div>
<a class="anchor" id="a30f73913c4ca0118aee0d1a49423e8dc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">- (id) initWithImageFile: </td>
<td></td>
<td class="paramtype">(NSURL *) </td>
<td class="paramname"><em>url</em></td>
</tr>
<tr>
<td class="paramkey">isMask:</td>
<td></td>
<td class="paramtype">(bool) </td>
<td class="paramname"><em>isMask</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize an image sampler with an image file. </p>
<p>If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded. </p>
</div>
</div>
<a class="anchor" id="a927f8c0998e5329bde4e8de20980ecd0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">+ (<a class="el" href="interface_chipmunk_image_sampler.html">ChipmunkImageSampler</a> *) samplerWithImageFile: </td>
<td></td>
<td class="paramtype">(NSURL *) </td>
<td class="paramname"><em>url</em></td>
</tr>
<tr>
<td class="paramkey">isMask:</td>
<td></td>
<td class="paramtype">(bool) </td>
<td class="paramname"><em>isMask</em> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return an autoreleased image sampler initialized with an image file. </p>
<p>If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_chipmunk_image_sampler_8h_source.html">ChipmunkImageSampler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 2 2015 11:28:11 for Chipmunk2D Pro API Reference by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>