remove trailing white spaces

pull/38/head
Qingping Hou 11 years ago
parent 36284c1ffe
commit b40be3d0f8

@ -142,9 +142,9 @@ end
return true if self does not share any area with rect_b
]]--
function Geom:notIntersectWith(rect_b)
if (self.x >= (rect_b.x + rect_b.w))
or (self.y >= (rect_b.y + rect_b.h))
or (rect_b.x >= (self.x + self.w))
if (self.x >= (rect_b.x + rect_b.w))
or (self.y >= (rect_b.y + rect_b.h))
or (rect_b.x >= (self.x + self.w))
or (rect_b.y >= (self.y + self.h)) then
return true
end

@ -156,7 +156,7 @@ function GestureDetector:isDoubleTap(tap1, tap2)
end
function GestureDetector:isTwoFingerTap()
if self.last_tevs[0] == nil or self.last_tevs[1] == nil then
if self.last_tevs[0] == nil or self.last_tevs[1] == nil then
return false
end
local x_diff0 = math.abs(self.last_tevs[0].x - self.first_tevs[0].x)
@ -607,7 +607,7 @@ function GestureDetector:adjustGesCoordinate(ges)
if ges.pos then
ges.pos.x, ges.pos.y = (Screen.width - ges.pos.y), (ges.pos.x)
end
if ges.ges == "swipe" or ges.ges == "pan"
if ges.ges == "swipe" or ges.ges == "pan"
or ges.ges == "two_finger_swipe"
or ges.ges == "two_finger_pan" then
if ges.direction == "north" then

@ -65,13 +65,13 @@ Draw a progress bar according to following args:
@load_percent: progress in percent
@c: color for loading bar
--]]
function blitbuffer.progressBar(bb, x, y, w, h,
function blitbuffer.progressBar(bb, x, y, w, h,
load_m_w, load_m_h, load_percent, c)
if load_m_h*2 > h then
load_m_h = h/2
end
bb:paintBorder(x, y, w, h, 2, 15)
bb:paintRect(x+load_m_w, y+load_m_h,
bb:paintRect(x+load_m_w, y+load_m_h,
(w-2*load_m_w)*load_percent, (h-2*load_m_h), c)
end
@ -93,8 +93,8 @@ Cursor = {
function Cursor:new(o)
o = o or {}
o.x_pos = o.x_pos or self.x_pos
o.y_pos = o.y_pos or self.y_pos
o.x_pos = o.x_pos or self.x_pos
o.y_pos = o.y_pos or self.y_pos
o.line_width_factor = o.line_width_factor or 10
setmetatable(o, self)
@ -116,7 +116,7 @@ function Cursor:_draw(x, y)
-- paint upper horizontal line
fb.bb:invertRect(x, y, self.w, up_down_width)
-- paint middle vertical line
fb.bb:invertRect(x + (self.w / 2) - up_down_width, y + up_down_width,
fb.bb:invertRect(x + (self.w / 2) - up_down_width, y + up_down_width,
self.line_w, body_h)
-- paint lower horizontal line
fb.bb:invertRect(x, y + body_h + up_down_width, self.w, up_down_width)

Loading…
Cancel
Save