Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

new line

  • Loading branch information...
commit 15042fb53c104e854fc39e59f050b4dc917398dc 1 parent 977a456
authored December 08, 2011

Showing 1 changed file with 21 additions and 0 deletions. Show diff stats Hide diff stats

  1. 21  crawlspaceLib.lua
21  crawlspaceLib.lua
@@ -464,6 +464,27 @@ display.newGroup = function(...)
464 464
     return g
465 465
 end
466 466
 
  467
+        --[[ ########## NewLine Override  ########## ]--
  468
+
  469
+As with all display objects, you may append a string argument to set
  470
+it's reference point.
  471
+
  472
+:: EXAMPLE 1 ::
  473
+
  474
+display.newLine(centerX, centerY, centerX + 20, centerY [, "tl"])
  475
+
  476
+]]
  477
+
  478
+cache.newLine = display.newLine
  479
+display.newLine = function( parent, x1, y1, x2, y2, rp )
  480
+    local parent, x1, y1, x2, y2, rp = parent, x1, y1, x2, y2, rp
  481
+    if tonum(parent) then x1, y1, x2, y2, rp = parent, x1, y1, x2, y2 end
  482
+
  483
+    local l = cache.newLine( x1, y1, x2, y2 )
  484
+    if referencePoints( l, rp ) then displayMethods( l ) end
  485
+    return l
  486
+end
  487
+
467 488
             --[[ ########## NewCircle Override  ########## ]--
468 489
 
469 490
 As with all display objects, you may append a string argument to set

0 notes on commit 15042fb

Please sign in to comment.
Something went wrong with that request. Please try again.