https://wiki.synfig.org/index.php?title=Dev:State_stroke&feed=atom&action=historyDev:State stroke - Revision history2024-03-28T10:46:24ZRevision history for this page on the wikiMediaWiki 1.26.3https://wiki.synfig.org/index.php?title=Dev:State_stroke&diff=11671&oldid=prevZelgadis: moved State stroke to Dev:State stroke2010-02-22T05:37:36Z<p>moved <a href="/index.php?title=State_stroke&action=edit&redlink=1" class="new" title="State stroke (page does not exist)">State stroke</a> to <a href="/Dev:State_stroke" title="Dev:State stroke">Dev:State stroke</a></p>
<table class='diff diff-contentalign-left'>
<tr style='vertical-align: top;' lang='en'>
<td colspan='1' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black; text-align: center;">Revision as of 05:37, 22 February 2010</td>
</tr><tr><td colspan='2' style='text-align: center;' lang='en'><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Zelgadishttps://wiki.synfig.org/index.php?title=Dev:State_stroke&diff=10395&oldid=prevZelgadis: Text replace - ']]' to '}}'2009-09-08T07:25:26Z<p>Text replace - ']]' to '}}'</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 07:25, 8 September 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the {{l|Toolbox<del class="diffchange diffchange-inline">]]</del>. You see it on the {{l|Draw Tool<del class="diffchange diffchange-inline">]] </del>and the {{l|Sketch Tool<del class="diffchange diffchange-inline">]] </del>between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the {{l|Toolbox<ins class="diffchange diffchange-inline">}}</ins>. You see it on the {{l|Draw Tool<ins class="diffchange diffchange-inline">}} </ins>and the {{l|Sketch Tool<ins class="diffchange diffchange-inline">}} </ins>between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''NOTE: state_stroke does NOT handle mouse-down! This is to allow your tool to figure out if it needs to do anything different based on where the mouse is clicking, *before* state_stroke is entered!''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''NOTE: state_stroke does NOT handle mouse-down! This is to allow your tool to figure out if it needs to do anything different based on where the mouse is clicking, *before* state_stroke is entered!''</div></td></tr>
</table>Zelgadishttps://wiki.synfig.org/index.php?title=Dev:State_stroke&diff=9904&oldid=prevZelgadis: Text replace - '[[' to '{{l|'2009-09-08T05:56:43Z<p>Text replace - '[[' to '{{l|'</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 05:56, 8 September 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the <del class="diffchange diffchange-inline">[[</del>Toolbox]]. You see it on the <del class="diffchange diffchange-inline">[[</del>Draw Tool]] and the <del class="diffchange diffchange-inline">[[</del>Sketch Tool]] between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the <ins class="diffchange diffchange-inline">{{l|</ins>Toolbox]]. You see it on the <ins class="diffchange diffchange-inline">{{l|</ins>Draw Tool]] and the <ins class="diffchange diffchange-inline">{{l|</ins>Sketch Tool]] between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''NOTE: state_stroke does NOT handle mouse-down! This is to allow your tool to figure out if it needs to do anything different based on where the mouse is clicking, *before* state_stroke is entered!''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>''NOTE: state_stroke does NOT handle mouse-down! This is to allow your tool to figure out if it needs to do anything different based on where the mouse is clicking, *before* state_stroke is entered!''</div></td></tr>
</table>Zelgadishttps://wiki.synfig.org/index.php?title=Dev:State_stroke&diff=3387&oldid=prevSnapSilverlight at 00:50, 26 April 20062006-04-26T00:50:41Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 00:50, 26 April 2006</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l2" >Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the [[Toolbox]]. You see it on the [[Draw Tool]] and the [[Sketch Tool]] between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>state_stroke is an 'invisible' mode - that is, you can't select it from the [[Toolbox]]. You see it on the [[Draw Tool]] and the [[Sketch Tool]] between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">''NOTE: state_stroke does NOT handle mouse-down! This is to allow your tool to figure out if it needs to do anything different based on where the mouse is clicking, *before* state_stroke is entered!''</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Provides==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Provides==</div></td></tr>
</table>SnapSilverlighthttps://wiki.synfig.org/index.php?title=Dev:State_stroke&diff=229&oldid=prevSnapSilverlight: Description of State Stroke2006-04-26T00:35:30Z<p>Description of State Stroke</p>
<p><b>New page</b></p><div>==Description==<br />
state_stroke is an 'invisible' mode - that is, you can't select it from the [[Toolbox]]. You see it on the [[Draw Tool]] and the [[Sketch Tool]] between mouse-down and mouse up, it's what's actually drawing to the canvas and taking your data.<br />
<br />
<br />
==Provides==<br />
EventStroke(stroke_data,width_data,modifier)<br />
: EventStroke is sent to the tool that calls state_stroke as soon as the state exits, along with the stroke data. Intercept this event to do something with the data.<br />
<br />
==Internals==<br />
<br />
===Events Caught===<br />
*EVENT_STOP: event_stop_handler<br />
*EVENT_REFRESH: event_refresh_handler<br />
*EVENT_WORKAREA_MOUSE_BUTTON_UP: event_mouse_up_handler<br />
*EVENT_WORKAREA_MOUSE_BUTTON_DRAG: event_mouse_draw_handler<br />
*EVENT_REFRESH_TOOL_OPTIONS event_refresh_tool_options<br />
<br />
<br />
===StateStroke_Context===<br />
''State constructor''<br />
<br />
===~StateStroke_Context===<br />
''State destructor''<br />
<br />
Restores the previous duck view, refreshes the toolbox, and raises EventStroke on the State Machine.<br />
<br />
===event_refresh_tool_options===<br />
Intercepts the event, and nothing further.<br />
<br />
===event_stop_handler===<br />
exits the state (pop-exception)<br />
<br />
===event_refresh_handler===<br />
Intercepts the event, and nothing further.<br />
<br />
===event_mouse_up_handler====<br />
''MouseUp Handler''<br />
<br />
If this is the LMB, set 'modifier' for the destructor event from the mouse event's data, then exit the state (pop-exception)<br />
<br />
If this is for the RMB, intercept the signal and end.<br />
<br />
If this is for any other mouse button, pass it along.<br />
<br />
===event_mouse_draw_handler===<br />
''Mouse drag event handler''<br />
<br />
If this is the LMB, accept the event, add the event's position to stroke_data, and the event's pressure to width_data, and call queue_draw (?).<br />
<br />
If it's the RMB, accept the event to keep the context menu from appearing.<br />
<br />
Any other button, pass the event along.</div>SnapSilverlight