<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/rectangle</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 10:01:14 GMT</pubDate>
<item>
<title>(ActionScript 3) AS3 getVisibleBounds - adrianparr</title>
<link>http://snipplr.com/view/63449/as3-getvisiblebounds/</link>
<description><![CDATA[ <p>All credit for this goes to Zach Foley (aka Plastic Sturgeon)</p> ]]></description>
<pubDate>Mon, 20 Feb 2012 21:09:35 GMT</pubDate>
<guid>http://snipplr.com/view/63449/as3-getvisiblebounds/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 DrawingUtil Class - adrianparr</title>
<link>http://snipplr.com/view/56188/as3-drawingutil-class/</link>
<description><![CDATA[ <p>All credit for this class goes to Ben Kanizay (http://bk4d.com)</p> ]]></description>
<pubDate>Wed, 06 Jul 2011 23:51:01 GMT</pubDate>
<guid>http://snipplr.com/view/56188/as3-drawingutil-class/</guid>
</item>
<item>
<title>(JavaScript) google maps v3 rectangle - sneaks</title>
<link>http://snipplr.com/view/54414/google-maps-v3-rectangle/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 26 May 2011 15:09:19 GMT</pubDate>
<guid>http://snipplr.com/view/54414/google-maps-v3-rectangle/</guid>
</item>
<item>
<title>(ActionScript 3) Draw a shape - marzsman</title>
<link>http://snipplr.com/view/51520/draw-a-shape/</link>
<description><![CDATA[ <p>Draw s simple shape in as3</p> ]]></description>
<pubDate>Mon, 04 Apr 2011 22:59:42 GMT</pubDate>
<guid>http://snipplr.com/view/51520/draw-a-shape/</guid>
</item>
<item>
<title>(ActionScript 3) DrawGrid - withinmedianl</title>
<link>http://snipplr.com/view/49381/drawgrid/</link>
<description><![CDATA[ <p>Draws a grid so you can see if your placement is good</p> ]]></description>
<pubDate>Tue, 22 Feb 2011 04:34:05 GMT</pubDate>
<guid>http://snipplr.com/view/49381/drawgrid/</guid>
</item>
<item>
<title>(ActionScript 3) Draw a rectangle using AS3 - f6design</title>
<link>http://snipplr.com/view/42687/draw-a-rectangle-using-as3/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 21 Oct 2010 17:03:11 GMT</pubDate>
<guid>http://snipplr.com/view/42687/draw-a-rectangle-using-as3/</guid>
</item>
<item>
<title>(Objective C) Drawing Scaled Rectangles with NSDrawNinePartImage - zingo</title>
<link>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</link>
<description><![CDATA[ <p>Drawing scaled rectangles of arbitrary width and height that keeps the corner and sides properly scaled while growing the center.</p> ]]></description>
<pubDate>Fri, 20 Aug 2010 08:22:46 GMT</pubDate>
<guid>http://snipplr.com/view/39335/drawing-scaled-rectangles-with-nsdrawninepartimage/</guid>
</item>
<item>
<title>(ActionScript) Draw rectangle - ricosushi</title>
<link>http://snipplr.com/view/37260/draw-rectangle/</link>
<description><![CDATA[ <p>Params: Color, alpha, x pos, y pos, width, height</p> ]]></description>
<pubDate>Wed, 14 Jul 2010 07:28:06 GMT</pubDate>
<guid>http://snipplr.com/view/37260/draw-rectangle/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 bitmapData.draw() with Masked DisplayObject - adrianparr</title>
<link>http://snipplr.com/view/32341/as3-bitmapdatadraw-with-masked-displayobject/</link>
<description><![CDATA[ <p>If you need to use bitmapData.draw() method on a DisplayObject that has a mask as a child then it can be awkward getting it to work properly. Using Thomas John's getRealBounds method is a great solution.</p> ]]></description>
<pubDate>Mon, 19 Apr 2010 13:12:06 GMT</pubDate>
<guid>http://snipplr.com/view/32341/as3-bitmapdatadraw-with-masked-displayobject/</guid>
</item>
<item>
<title>(Haskell) Interval of integral points - deepsoul</title>
<link>http://snipplr.com/view/29989/interval-of-integral-points/</link>
<description><![CDATA[ <p>These functions return all points (pairs or triples of coordinates) within a given rectangle or box.  ``pam`` is the reverse map function which was defined [here](http://snipplr.com/view/18351/reverse-map/).</p> ]]></description>
<pubDate>Thu, 18 Mar 2010 16:15:42 GMT</pubDate>
<guid>http://snipplr.com/view/29989/interval-of-integral-points/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Draw a Simple Rectangular Mask - adrianparr</title>
<link>http://snipplr.com/view/29279/as3-draw-a-simple-rectangular-mask/</link>
<description><![CDATA[ <p>This is handy for quickly creating you own rectangular masks on-the-fly.</p> ]]></description>
<pubDate>Thu, 04 Mar 2010 09:05:52 GMT</pubDate>
<guid>http://snipplr.com/view/29279/as3-draw-a-simple-rectangular-mask/</guid>
</item>
<item>
<title>(ActionScript 3) AS3  Fit DisplayObject into Rectangle - adrianparr</title>
<link>http://snipplr.com/view/28016/as3--fit-displayobject-into-rectangle/</link>
<description><![CDATA[ <p>DisplayUtils.as and Alignment.as

These two classes by Justin Windle (aka Soulwire) can be used to scale a DisplayObject to fit within (fill) a rectangle, without distorting the image.

Example Usage

Fit a DisplayObject into a Rectangle

var area:Rectangle = new Rectangle( 0, 0, 200, 100 );
DisplayUtils.fitIntoRect( myDisplayObject, area, true, Alignment.MIDDLE );

Create a fullscreen background image

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

function onStageResized( event:Event = null ):void
{
	var area:Rectangle = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );
	DisplayUtils.fitIntoRect( myDisplayObject, area, true, Alignment.MIDDLE );
}

stage.addEventListener( Event.RESIZE, onStageResized );
onStageResized();

Create a thumbnail

var thumb:Bitmap = DisplayUtils.createThumb( myBitmap.bitmapData, 100, 100, Alignment.MIDDLE, true );
addChild( thumb );</p> ]]></description>
<pubDate>Tue, 09 Feb 2010 04:39:23 GMT</pubDate>
<guid>http://snipplr.com/view/28016/as3--fit-displayobject-into-rectangle/</guid>
</item>
<item>
<title>(Pseudocode) Draw a lasso rectangle - helloworlder</title>
<link>http://snipplr.com/view/18556/draw-a-lasso-rectangle/</link>
<description><![CDATA[ <p>start_loc.x and start_loc.y is the position where the dragging first began.

Note that the top, bottom, left , and right represents positions of the 4 lines, with the anchor point at either the top of the line if vertical or left if horizontal.

Also note that the variable top will not always represent the position of the top line and the bottom not always the bottom etc, but only if you imagine dragging a lasso box from the top left to the bottom right. It does not matter however, the lasso will work in any case. The naming just made it easier for me to code it. Just think about it a little and you'll get it.</p> ]]></description>
<pubDate>Wed, 19 Aug 2009 12:22:08 GMT</pubDate>
<guid>http://snipplr.com/view/18556/draw-a-lasso-rectangle/</guid>
</item>
<item>
<title>(Java) RectangleTest.java - joshnunn</title>
<link>http://snipplr.com/view/18226/rectangletestjava/</link>
<description><![CDATA[ <p>This is a test driver class. It instantiates a few rectangles with varying lengths and widths and then prints their areas and perimeters.

What is odd is the output I get from NetBeans for the "stupid" rectangle. The program prints its value as "1280.3200000000002".</p> ]]></description>
<pubDate>Wed, 12 Aug 2009 18:14:27 GMT</pubDate>
<guid>http://snipplr.com/view/18226/rectangletestjava/</guid>
</item>
<item>
<title>(Java) Rectangle.java - joshnunn</title>
<link>http://snipplr.com/view/18225/rectanglejava/</link>
<description><![CDATA[ <p>This is a program to implement a Rectangle. Private fields record the length and width and methods calculate the area and perimeter. It sets a default length and width if one is not given.</p> ]]></description>
<pubDate>Wed, 12 Aug 2009 18:10:56 GMT</pubDate>
<guid>http://snipplr.com/view/18225/rectanglejava/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: Scroller - visualadvance</title>
<link>http://snipplr.com/view/16776/as3-scroller/</link>
<description><![CDATA[ <p>This may not be useful to anyone else as is, but I wanted to keep my typical scrolling code somewhere for easy access. This uses TweenMax as well which obviously isn't included.
This assumes you have content_mc for the stuff to be scrolled, scrollArrow as your dragger, scrollerTrack as the bar the dragger follows, and contentMask to mask your content within a certain area.</p> ]]></description>
<pubDate>Wed, 08 Jul 2009 11:35:45 GMT</pubDate>
<guid>http://snipplr.com/view/16776/as3-scroller/</guid>
</item>
<item>
<title>(ActionScript 3) Rectangle - zeman</title>
<link>http://snipplr.com/view/15823/rectangle/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 11 Jun 2009 00:05:41 GMT</pubDate>
<guid>http://snipplr.com/view/15823/rectangle/</guid>
</item>
<item>
<title>(ActionScript) No Focus Rectangle in Flash - ypmits</title>
<link>http://snipplr.com/view/2381/no-focus-rectangle-in-flash/</link>
<description><![CDATA[ <p>For when you have to get rid of those annoying Focus Rectangles</p> ]]></description>
<pubDate>Fri, 23 Mar 2007 10:43:29 GMT</pubDate>
<guid>http://snipplr.com/view/2381/no-focus-rectangle-in-flash/</guid>
</item>
</channel>
</rss>