sugarcube 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sugarcube/core_graphics.rb +8 -8
- data/lib/sugarcube/version.rb +1 -1
- metadata +1 -1
@@ -258,10 +258,10 @@ module SugarCube
|
|
258
258
|
super [Point.new([args[0], args[1]]), Size.new([args[2], args[3]])]
|
259
259
|
else
|
260
260
|
unless args[0].is_a? Point
|
261
|
-
args[0] = Point(args[0])
|
261
|
+
args[0] = SugarCube::CoreGraphics::Point(args[0])
|
262
262
|
end
|
263
263
|
unless args[1].is_a? Size
|
264
|
-
args[1] = Size(args[1])
|
264
|
+
args[1] = SugarCube::CoreGraphics::Size(args[1])
|
265
265
|
end
|
266
266
|
super [args[0], args[1]]
|
267
267
|
end
|
@@ -272,7 +272,7 @@ module SugarCube
|
|
272
272
|
end
|
273
273
|
|
274
274
|
def origin= val
|
275
|
-
self[0] = Point(val)
|
275
|
+
self[0] = SugarCube::CoreGraphics::Point(val)
|
276
276
|
end
|
277
277
|
|
278
278
|
def size
|
@@ -280,7 +280,7 @@ module SugarCube
|
|
280
280
|
end
|
281
281
|
|
282
282
|
def size= val
|
283
|
-
self[1] = Size(val)
|
283
|
+
self[1] = SugarCube::CoreGraphics::Size(val)
|
284
284
|
end
|
285
285
|
end
|
286
286
|
|
@@ -307,11 +307,11 @@ module SugarCube
|
|
307
307
|
# adds a vector to this point, or creates a Rect by adding a size
|
308
308
|
def +(point)
|
309
309
|
case point
|
310
|
-
when Point, CGPoint
|
310
|
+
when SugarCube::CoreGraphics::Point, CGPoint
|
311
311
|
x = self.x + point.x
|
312
312
|
y = self.y + point.y
|
313
313
|
Point[x, y]
|
314
|
-
when Size, CGSize
|
314
|
+
when SugarCube::CoreGraphics::Size, CGSize
|
315
315
|
Rect[self, point]
|
316
316
|
else
|
317
317
|
super
|
@@ -491,10 +491,10 @@ module SugarCube
|
|
491
491
|
raise RuntimeError.new("Invalid argument sent to Rect(#{x_or_origin.inspect})")
|
492
492
|
end
|
493
493
|
elsif not w and not h
|
494
|
-
x_or_origin = Point(x_or_origin) unless x_or_origin.is_a? Point
|
494
|
+
x_or_origin = SugarCube::CoreGraphics::Point(x_or_origin) unless x_or_origin.is_a? SugarCube::CoreGraphics::Point
|
495
495
|
x = x_or_origin.x
|
496
496
|
y = x_or_origin.y
|
497
|
-
y_or_size = Size(y_or_size) unless y_or_size.is_a? Size
|
497
|
+
y_or_size = SugarCube::CoreGraphics::Size(y_or_size) unless y_or_size.is_a? SugarCube::CoreGraphics::Size
|
498
498
|
w = y_or_size.width
|
499
499
|
h = y_or_size.height
|
500
500
|
else
|
data/lib/sugarcube/version.rb
CHANGED