• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Ruby GTK3移行後のメインリポジトリ


Commit MetaInfo

修訂6c7a24b7e800cb69fd36a04279898e75b41c07c2 (tree)
時間2015-03-12 23:52:19
作者Shyouzou Sugitani <shy@user...>
CommiterShyouzou Sugitani

Log Message

update surface.rb

Change Summary

差異

--- a/lib/ninix/surface.rb
+++ b/lib/ninix/surface.rb
@@ -652,8 +652,8 @@ module Surface
652652 x, y = get_position(side)
653653 direction = @window[side].direction
654654 ox, oy = get_balloon_offset(side)
655- parent.handle_request(
656- 'NOTIFY', 'set_balloon_direction', side, direction)
655+ @parent.handle_request(
656+ 'NOTIFY', 'set_balloon_direction', side, direction)
657657 if direction == 0 # left
658658 base_x = x + ox
659659 else
@@ -662,7 +662,7 @@ module Surface
662662 end
663663 base_y = y + oy
664664 @parent.handle_request(
665- 'NOTIFY', 'set_balloon_position', side, base_x, base_y)
665+ 'NOTIFY', 'set_balloon_position', side, base_x, base_y)
666666 end
667667 end
668668
@@ -1344,12 +1344,14 @@ module Surface
13441344 cr.move_to(x1 + 2, y1)
13451345 font_desc = Pango::FontDescription.new
13461346 font_desc.set_size(8 * Pango::SCALE)
1347- layout = Pango::Layout.new(@darea.pango_context)
1347+ layout = cr.create_pango_layout
1348+# layout = Pango::Layout.new(@darea.pango_context)
13481349 layout.set_font_description(font_desc)
13491350 layout.set_wrap(Pango::WRAP_WORD_CHAR) # XXX
1350- layout.set_text(part, -1)
1351- PangoCairo.update_layout(cr, layout)
1352- PangoCairo.show_layout(cr, layout)
1351+ layout.set_text(part)
1352+ cr.show_pango_layout(layout)
1353+# PangoCairo.update_layout(cr, layout)
1354+# PangoCairo.show_layout(cr, layout)
13531355 end
13541356 cr.set_operator(Cairo::OPERATOR_ATOP)
13551357 cr.set_source_rgba(0.2, 0.0, 0.0, 0.4) # XXX
@@ -1368,8 +1370,8 @@ module Surface
13681370 end
13691371 if @mayuna.include?(surface_id) and @mayuna[surface_id]
13701372 surface = get_image_surface(surface_id)
1371- surface_width = surface.get_width()
1372- surface_height = surface.get_height()
1373+ surface_width = surface.width
1374+ surface_height = surface.height
13731375 done = []
13741376 for actor in @mayuna[surface_id]
13751377 actor_id = actor.get_id()
@@ -1411,7 +1413,7 @@ module Surface
14111413 for surface_id, x, y, method in @seriko.iter_overlays()
14121414 begin
14131415 overlay_surface = get_image_surface(
1414- surface_id, is_asis=bool(method == 'asis'))
1416+ surface_id, is_asis=(method == 'asis'))
14151417 rescue # except:
14161418 next
14171419 end
@@ -1427,13 +1429,13 @@ module Surface
14271429 'asis' => Cairo::OPERATOR_OVER,
14281430 }[method]
14291431 cr.set_operator(op)
1430- cr.set_source_surface(overlay_surface, x, y)
1432+ cr.set_source(overlay_surface, x, y)
14311433 if ['overlay', 'overlayfast'].include?(method)
1432- cr.mask_surface(overlay_surface, x, y)
1434+ cr.mask(overlay_surface, x, y)
14331435 else
14341436 cr.paint()
14351437 end
1436- del cr
1438+# del cr
14371439 end
14381440 @image_surface = new_surface
14391441 @darea.queue_draw()