Class: FX::DCWindow
- Inherits:
-
Fox::FXDCWindow
- Object
- Fox::FXDCWindow
- FX::DCWindow
- Defined in:
- lib/libGUIb16.rb,
lib/libGUIb14.rb
Instance Method Summary collapse
- #drawImageText(x, y, text) ⇒ Object
- #drawLine(x, y, x1, y1) ⇒ Object
- #drawRectangle(x, y, w, h) ⇒ Object
- #drawText(x, y, text, bg = false) ⇒ Object
- #fillRectangle(x, y, w, h) ⇒ Object
- #getOrigin ⇒ Object
-
#initialize(*args) ⇒ DCWindow
constructor
A new instance of DCWindow.
- #popOrigin ⇒ Object
- #pushOrigin(x = 0, y = 0) ⇒ Object
- #setOrigin(x = 0, y = 0) ⇒ Object
Constructor Details
#initialize(*args) ⇒ DCWindow
Returns a new instance of DCWindow.
1512 1513 1514 1515 |
# File 'lib/libGUIb16.rb', line 1512 def initialize(*args) super setOrigin(0, 0) end |
Instance Method Details
#drawImageText(x, y, text) ⇒ Object
1546 1547 1548 |
# File 'lib/libGUIb16.rb', line 1546 def drawImageText x, y, text super(@xOrigin + x, @yOrigin + y, text) end |
#drawLine(x, y, x1, y1) ⇒ Object
1550 1551 1552 |
# File 'lib/libGUIb16.rb', line 1550 def drawLine x, y, x1, y1 super(@xOrigin + x, @yOrigin + y, @xOrigin + x1, @yOrigin + y1) end |
#drawRectangle(x, y, w, h) ⇒ Object
1558 1559 1560 |
# File 'lib/libGUIb16.rb', line 1558 def drawRectangle x, y, w, h super(@xOrigin + x, @yOrigin + y, w, h) end |
#drawText(x, y, text, bg = false) ⇒ Object
1538 1539 1540 1541 1542 1543 1544 |
# File 'lib/libGUIb16.rb', line 1538 def drawText x, y, text, bg = false if bg drawImageText(@xOrigin + x, @yOrigin + y, text) else super(@xOrigin + x, @yOrigin + y, text) end end |
#fillRectangle(x, y, w, h) ⇒ Object
1554 1555 1556 |
# File 'lib/libGUIb16.rb', line 1554 def fillRectangle x, y, w, h super(@xOrigin + x, @yOrigin + y, w, h) end |
#getOrigin ⇒ Object
1517 1518 1519 |
# File 'lib/libGUIb16.rb', line 1517 def getOrigin [@xOrigin, @yOrigin] end |
#popOrigin ⇒ Object
1533 1534 1535 1536 |
# File 'lib/libGUIb16.rb', line 1533 def popOrigin @originStack.pop if @originStack.size > 1 @xOrigin, @yOrigin = @originStack.last end |
#pushOrigin(x = 0, y = 0) ⇒ Object
1527 1528 1529 1530 1531 |
# File 'lib/libGUIb16.rb', line 1527 def pushOrigin x = 0, y = 0 @xOrigin += x @yOrigin += y @originStack.push [@xOrigin, @yOrigin] end |
#setOrigin(x = 0, y = 0) ⇒ Object
1521 1522 1523 1524 1525 |
# File 'lib/libGUIb16.rb', line 1521 def setOrigin x = 0, y = 0 @xOrigin = x @yOrigin = y @originStack = [x, y] end |