SpriteLibrary/SpriteLibrary/Doc/Help/html/184a1964-91ec-6f0d-b7cf-95b...

13 lines
9.2 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><link rel="shortcut icon" href="../icons/favicon.ico" /><link rel="stylesheet" type="text/css" href="../styles/branding.css" /><link rel="stylesheet" type="text/css" href="../styles/branding-en-US.css" /><script type="text/javascript" src="../scripts/branding.js"> </script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Sprite Constructor (SpriteController, Image, Int32, Int32)</title><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Id" content="M:SpriteLibrary.Sprite.#ctor(SpriteLibrary.SpriteController,System.Drawing.Image,System.Int32,System.Int32)" /><meta name="Description" content="Generate a new sprite. It takes the image and the width and height. If there are multiple images of that width and height in the image, an animation is created." /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="BrandingAware" content="true" /><meta name="container" content="SpriteLibrary" /><meta name="file" content="184a1964-91ec-6f0d-b7cf-95b722599d69" /><meta name="guid" content="184a1964-91ec-6f0d-b7cf-95b722599d69" /><link rel="stylesheet" type="text/css" href="../styles/branding-Website.css" /><script type="text/javascript" src="../scripts/jquery-1.11.0.min.js"></script><script type="text/javascript" src="../scripts/branding-Website.js"></script><script type="text/javascript" src="../scripts/clipboard.min.js"></script></head><body onload="OnLoad('cs')"><input type="hidden" id="userDataCache" class="userDataStyle" /><div class="pageHeader" id="PageHeader">SpriteLibrary<form id="SearchForm" method="get" action="#" onsubmit="javascript:TransferToSearchPage(); return false;"><input id="SearchTextBox" type="text" maxlength="200" /><button id="SearchButton" type="submit"></button></form></div><div class="pageBody"><div class="leftNav" id="leftNav"><div id="tocNav"><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm" title="SpriteLibrary" tocid="roottoc">SpriteLibrary</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm" title="SpriteLibrary" tocid="6b7227c0-7a6a-6342-3b08-917c7de429cc">SpriteLibrary</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="66013d9b-4126-7d65-05bb-94eb9d134be6.htm" title="Sprite Class" tocid="66013d9b-4126-7d65-05bb-94eb9d134be6">Sprite Class</a></div><div class="toclevel1" data-toclevel="1" data-childrenloaded="true"><a class="tocExpanded" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="8a70b6b2-3e2d-3c6f-0d8c-18e6dea4368e.htm" title="Sprite Constructor " tocid="8a70b6b2-3e2d-3c6f-0d8c-18e6dea4368e">Sprite Constructor </a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="bacd1b59-34a9-eb30-29b3-4fdc704a7b60.htm" title="Sprite Constructor (Sprite, Boolean)" tocid="bacd1b59-34a9-eb30-29b3-4fdc704a7b60">Sprite Constructor (Sprite, Boolean)</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="98f8bf30-d3ab-5f86-9fbf-9f76df20f2e6.htm" title="Sprite Constructor (SpriteController, Image)" tocid="98f8bf30-d3ab-5f86-9fbf-9f76df20f2e6">Sprite Constructor (SpriteController, Image)</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="ecbab3a8-aa92-2bb6-efc6-cf26d1df424a.htm" title="Sprite Constructor (SpriteController, Image, Size)" tocid="ecbab3a8-aa92-2bb6-efc6-cf26d1df424a">Sprite Constructor (SpriteController, Image, Size)</a></div><div class="toclevel2 current" data-toclevel="2"><a data-tochassubtree="false" href="184a1964-91ec-6f0d-b7cf-95b722599d69.htm" title="Sprite Constructor (SpriteController, Image, Int32, Int32)" tocid="184a1964-91ec-6f0d-b7cf-95b722599d69">Sprite Constructor (SpriteController, Image, Int32, Int32)</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="6541bf2d-e608-1bad-2e7f-1b0f2deb0c34.htm" title="Sprite Constructor (SpriteController, Image, Int32, Int32, Int32)" tocid="6541bf2d-e608-1bad-2e7f-1b0f2deb0c34">Sprite Constructor (SpriteController, Image, Int32, Int32, Int32)</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="8e88c5f2-f5d0-02df-c7cb-9701313411af.htm" title="Sprite Constructor (Point, SpriteController, Image, Int32, Int32, Int32, Int32)" tocid="8e88c5f2-f5d0-02df-c7cb-9701313411af">Sprite Constructor (Point, SpriteController, Image, Int32, Int32, Int32, Int32)</a></div></div><div id="tocResizableEW" onmousedown="OnMouseDown(event);"></div><div id="TocResize" class="tocResize"><img id="ResizeImageIncrease" src="../icons/TocOpen.gif" onclick="OnIncreaseToc()" alt="Click or drag to resize" title="Click or drag to resize" /><img id="ResizeImageReset" src="../icons/TocClose.gif" style="display:none" onclick="OnResetToc()" alt="Click or drag to resize" title="Click or drag to resize" /></div></div><div class="topicContent" id="TopicContent"><table class="titleTable"><tr><td class="titleColumn">Sprite Constructor (SpriteController, Image, Int32, Int32)</td></tr></table><span class="introStyle"></span> <div class="summary">
Generate a new sprite. It takes the image and the width and height. If there are multiple images of that width
and height in the image, an animation is created.
</div><p> </p>
<strong>Namespace:</strong>
 <a href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm">SpriteLibrary</a><br />
<strong>Assembly:</strong>
 SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('ID1RB')" onkeypress="SectionExpandCollapse_CheckKey('ID1RB', event)" tabindex="0"><img id="ID1RBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="ID1RBSection" class="collapsibleSection"><div class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="ID0EACA_tab1" class="codeSnippetContainerTabSingle">C#</div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="ID0EACA_copyCode" href="#" class="copyCodeSnippet" onclick="javascript:CopyToClipboard('ID0EACA');return false;" title="Copy">Copy</a></div></div><div id="ID0EACA_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> <span class="identifier">Sprite</span>(
<span class="identifier">SpriteController</span> <span class="parameter">Controller</span>,
<span class="identifier">Image</span> <span class="parameter">SpriteImage</span>,
<span class="identifier">int</span> <span class="parameter">width</span>,
<span class="identifier">int</span> <span class="parameter">height</span>
)</pre></div></div></div><script type="text/javascript">AddLanguageTabSet("ID0EACA");</script><h4 class="subHeading">Parameters</h4><dl><dt><span class="parameter">Controller</span></dt><dd>Type: <a href="07a473e4-4716-e5b9-c7d2-c4748265fc58.htm">SpriteLibrary<span id="LSTE1B72C4B_0"></span><script type="text/javascript">AddLanguageSpecificTextSet("LSTE1B72C4B_0?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>SpriteController</a><br />The sprite controller that manages this sprite</dd><dt><span class="parameter">SpriteImage</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/k7e7b2kd" target="_blank">System.Drawing<span id="LSTE1B72C4B_1"></span><script type="text/javascript">AddLanguageSpecificTextSet("LSTE1B72C4B_1?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>Image</a><br />The image we pull the animation from</dd><dt><span class="parameter">width</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank">System<span id="LSTE1B72C4B_2"></span><script type="text/javascript">AddLanguageSpecificTextSet("LSTE1B72C4B_2?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>Int32</a><br />The width of one animation frame</dd><dt><span class="parameter">height</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank">System<span id="LSTE1B72C4B_3"></span><script type="text/javascript">AddLanguageSpecificTextSet("LSTE1B72C4B_3?cs=.|vb=.|cpp=::|nu=.|fs=.");</script>Int32</a><br />The height of one animation frame</dd></dl></div><div class="collapsibleAreaRegion" id="seeAlsoSection"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('ID2RB')" onkeypress="SectionExpandCollapse_CheckKey('ID2RB', event)" tabindex="0"><img id="ID2RBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />See Also</span></div><div id="ID2RBSection" class="collapsibleSection"><h4 class="subHeading">Reference</h4><div class="seeAlsoStyle"><a href="66013d9b-4126-7d65-05bb-94eb9d134be6.htm">Sprite Class</a></div><div class="seeAlsoStyle"><a href="8a70b6b2-3e2d-3c6f-0d8c-18e6dea4368e.htm">Sprite Overload</a></div><div class="seeAlsoStyle"><a href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm">SpriteLibrary Namespace</a></div></div></div></div><div id="pageFooter" class="pageFooter"> </div></body></html>