fxruby 1.6.39-x86-mingw32 → 1.6.44-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -14
- data/.yardopts +1 -1
- data/Gemfile +4 -5
- data/History.md +1345 -22
- data/README.rdoc +5 -5
- data/Rakefile +100 -68
- data/appveyor.yml +11 -16
- data/docs/Fox.html +11184 -0
- data/docs/Fox/Canvas.html +141 -0
- data/docs/Fox/Canvas/CanvasError.html +124 -0
- data/docs/Fox/Canvas/CircleShape.html +477 -0
- data/docs/Fox/Canvas/ImageShape.html +477 -0
- data/docs/Fox/Canvas/LineShape.html +1005 -0
- data/docs/Fox/Canvas/PolygonShape.html +145 -0
- data/docs/Fox/Canvas/RectangleShape.html +439 -0
- data/docs/Fox/Canvas/SelectionPolicy.html +352 -0
- data/docs/Fox/Canvas/Shape.html +1955 -0
- data/docs/Fox/Canvas/ShapeCanvas.html +2031 -0
- data/docs/Fox/Canvas/ShapeGroup.html +527 -0
- data/docs/Fox/Canvas/SingleSelectionPolicy.html +291 -0
- data/docs/Fox/Canvas/TextShape.html +609 -0
- data/docs/Fox/FTNonModal.html +550 -0
- data/docs/Fox/FX4Splitter.html +1336 -0
- data/docs/Fox/FX7Segment.html +1010 -0
- data/docs/Fox/FXAccelTable.html +715 -0
- data/docs/Fox/FXApp.html +7998 -0
- data/docs/Fox/FXArc.html +562 -0
- data/docs/Fox/FXArrowButton.html +865 -0
- data/docs/Fox/FXBMPIcon.html +450 -0
- data/docs/Fox/FXBMPImage.html +434 -0
- data/docs/Fox/FXBitmap.html +1362 -0
- data/docs/Fox/FXBitmapFrame.html +595 -0
- data/docs/Fox/FXBitmapView.html +1451 -0
- data/docs/Fox/FXButton.html +534 -0
- data/docs/Fox/FXCURCursor.html +261 -0
- data/docs/Fox/FXCalendar.html +880 -0
- data/docs/Fox/FXCanvas.html +311 -0
- data/docs/Fox/FXCheckButton.html +949 -0
- data/docs/Fox/FXChoiceBox.html +472 -0
- data/docs/Fox/FXColor.html +1519 -0
- data/docs/Fox/FXColorBar.html +759 -0
- data/docs/Fox/FXColorDialog.html +591 -0
- data/docs/Fox/FXColorItem.html +323 -0
- data/docs/Fox/FXColorList.html +712 -0
- data/docs/Fox/FXColorRing.html +817 -0
- data/docs/Fox/FXColorSelector.html +796 -0
- data/docs/Fox/FXColorWell.html +850 -0
- data/docs/Fox/FXColorWheel.html +770 -0
- data/docs/Fox/FXComboBox.html +2939 -0
- data/docs/Fox/FXComboTableItem.html +544 -0
- data/docs/Fox/FXCommand.html +526 -0
- data/docs/Fox/FXComposite.html +433 -0
- data/docs/Fox/FXCursor.html +779 -0
- data/docs/Fox/FXDC.html +5231 -0
- data/docs/Fox/FXDCPrint.html +696 -0
- data/docs/Fox/FXDCWindow.html +358 -0
- data/docs/Fox/FXDataTarget.html +573 -0
- data/docs/Fox/FXDebugTarget.html +305 -0
- data/docs/Fox/FXDelegator.html +305 -0
- data/docs/Fox/FXDial.html +1133 -0
- data/docs/Fox/FXDialogBox.html +413 -0
- data/docs/Fox/FXDict.html +1063 -0
- data/docs/Fox/FXDirBox.html +752 -0
- data/docs/Fox/FXDirDialog.html +914 -0
- data/docs/Fox/FXDirItem.html +989 -0
- data/docs/Fox/FXDirList.html +1554 -0
- data/docs/Fox/FXDirSelector.html +995 -0
- data/docs/Fox/FXDockBar.html +1451 -0
- data/docs/Fox/FXDockHandler.html +468 -0
- data/docs/Fox/FXDockSite.html +678 -0
- data/docs/Fox/FXDockTitle.html +606 -0
- data/docs/Fox/FXDocument.html +536 -0
- data/docs/Fox/FXDragCorner.html +440 -0
- data/docs/Fox/FXDrawable.html +478 -0
- data/docs/Fox/FXDriveBox.html +746 -0
- data/docs/Fox/FXEvent.html +1736 -0
- data/docs/Fox/FXExtentd.html +1374 -0
- data/docs/Fox/FXExtentf.html +1374 -0
- data/docs/Fox/FXFileAssoc.html +850 -0
- data/docs/Fox/FXFileDialog.html +2688 -0
- data/docs/Fox/FXFileDict.html +1058 -0
- data/docs/Fox/FXFileItem.html +1141 -0
- data/docs/Fox/FXFileList.html +2259 -0
- data/docs/Fox/FXFileSelector.html +2529 -0
- data/docs/Fox/FXFileStream.html +503 -0
- data/docs/Fox/FXFoldingItem.html +2822 -0
- data/docs/Fox/FXFoldingList.html +5189 -0
- data/docs/Fox/FXFont.html +2998 -0
- data/docs/Fox/FXFontDesc.html +710 -0
- data/docs/Fox/FXFontDialog.html +420 -0
- data/docs/Fox/FXFontSelector.html +576 -0
- data/docs/Fox/FXFrame.html +1012 -0
- data/docs/Fox/FXGIFCursor.html +337 -0
- data/docs/Fox/FXGIFIcon.html +450 -0
- data/docs/Fox/FXGIFImage.html +434 -0
- data/docs/Fox/FXGLCanvas.html +700 -0
- data/docs/Fox/FXGLCone.html +785 -0
- data/docs/Fox/FXGLContext.html +649 -0
- data/docs/Fox/FXGLCube.html +703 -0
- data/docs/Fox/FXGLCylinder.html +791 -0
- data/docs/Fox/FXGLGroup.html +1385 -0
- data/docs/Fox/FXGLLine.html +653 -0
- data/docs/Fox/FXGLObject.html +759 -0
- data/docs/Fox/FXGLPoint.html +561 -0
- data/docs/Fox/FXGLShape.html +714 -0
- data/docs/Fox/FXGLSphere.html +626 -0
- data/docs/Fox/FXGLViewer.html +3506 -0
- data/docs/Fox/FXGLVisual.html +2147 -0
- data/docs/Fox/FXGradient.html +562 -0
- data/docs/Fox/FXGradientBar.html +2479 -0
- data/docs/Fox/FXGroupBox.html +688 -0
- data/docs/Fox/FXHeader.html +3040 -0
- data/docs/Fox/FXHeaderItem.html +1353 -0
- data/docs/Fox/FXHiliteStyle.html +804 -0
- data/docs/Fox/FXHorizontalFrame.html +359 -0
- data/docs/Fox/FXHorizontalSeparator.html +349 -0
- data/docs/Fox/FXICOIcon.html +450 -0
- data/docs/Fox/FXICOImage.html +434 -0
- data/docs/Fox/FXIcon.html +384 -0
- data/docs/Fox/FXIconDict.html +752 -0
- data/docs/Fox/FXIconItem.html +1518 -0
- data/docs/Fox/FXIconList.html +4676 -0
- data/docs/Fox/FXIconSource.html +963 -0
- data/docs/Fox/FXId.html +712 -0
- data/docs/Fox/FXImage.html +2328 -0
- data/docs/Fox/FXImageFrame.html +489 -0
- data/docs/Fox/FXImageView.html +504 -0
- data/docs/Fox/FXInputDialog.html +894 -0
- data/docs/Fox/FXIrb.html +942 -0
- data/docs/Fox/FXJPGIcon.html +607 -0
- data/docs/Fox/FXJPGImage.html +591 -0
- data/docs/Fox/FXKnob.html +1048 -0
- data/docs/Fox/FXLabel.html +1013 -0
- data/docs/Fox/FXLight.html +920 -0
- data/docs/Fox/FXList.html +3717 -0
- data/docs/Fox/FXListBox.html +2518 -0
- data/docs/Fox/FXListItem.html +1459 -0
- data/docs/Fox/FXMDIChild.html +2175 -0
- data/docs/Fox/FXMDIClient.html +781 -0
- data/docs/Fox/FXMDIDeleteButton.html +334 -0
- data/docs/Fox/FXMDIMaximizeButton.html +334 -0
- data/docs/Fox/FXMDIMenu.html +335 -0
- data/docs/Fox/FXMDIMinimizeButton.html +334 -0
- data/docs/Fox/FXMDIRestoreButton.html +334 -0
- data/docs/Fox/FXMDIWindowButton.html +334 -0
- data/docs/Fox/FXMainWindow.html +337 -0
- data/docs/Fox/FXMaterial.html +570 -0
- data/docs/Fox/FXMatrix.html +734 -0
- data/docs/Fox/FXMemoryBuffer.html +472 -0
- data/docs/Fox/FXMemoryStream.html +632 -0
- data/docs/Fox/FXMenuBar.html +347 -0
- data/docs/Fox/FXMenuButton.html +829 -0
- data/docs/Fox/FXMenuCaption.html +1080 -0
- data/docs/Fox/FXMenuCascade.html +388 -0
- data/docs/Fox/FXMenuCheck.html +721 -0
- data/docs/Fox/FXMenuCommand.html +400 -0
- data/docs/Fox/FXMenuPane.html +333 -0
- data/docs/Fox/FXMenuRadio.html +721 -0
- data/docs/Fox/FXMenuSeparator.html +440 -0
- data/docs/Fox/FXMenuTitle.html +405 -0
- data/docs/Fox/FXMessageBox.html +658 -0
- data/docs/Fox/FXObject.html +545 -0
- data/docs/Fox/FXOption.html +491 -0
- data/docs/Fox/FXOptionMenu.html +885 -0
- data/docs/Fox/FXPCXIcon.html +450 -0
- data/docs/Fox/FXPCXImage.html +434 -0
- data/docs/Fox/FXPNGIcon.html +524 -0
- data/docs/Fox/FXPNGImage.html +508 -0
- data/docs/Fox/FXPPMIcon.html +450 -0
- data/docs/Fox/FXPPMImage.html +373 -0
- data/docs/Fox/FXPSBounds.html +500 -0
- data/docs/Fox/FXPacker.html +1229 -0
- data/docs/Fox/FXPicker.html +345 -0
- data/docs/Fox/FXPopup.html +1099 -0
- data/docs/Fox/FXPrintDialog.html +485 -0
- data/docs/Fox/FXPrinter.html +1330 -0
- data/docs/Fox/FXProgressBar.html +1150 -0
- data/docs/Fox/FXProgressDialog.html +715 -0
- data/docs/Fox/FXPseudoKeyboard.html +428 -0
- data/docs/Fox/FXPseudoMouse.html +800 -0
- data/docs/Fox/FXPseudoTarget.html +472 -0
- data/docs/Fox/FXQuatd.html +1377 -0
- data/docs/Fox/FXQuatf.html +1392 -0
- data/docs/Fox/FXRGBIcon.html +450 -0
- data/docs/Fox/FXRGBImage.html +434 -0
- data/docs/Fox/FXRadioButton.html +885 -0
- data/docs/Fox/FXRanged.html +1522 -0
- data/docs/Fox/FXRangef.html +1522 -0
- data/docs/Fox/FXRealSlider.html +1187 -0
- data/docs/Fox/FXRealSpinner.html +2175 -0
- data/docs/Fox/FXRecentFiles.html +841 -0
- data/docs/Fox/FXRectangle.html +802 -0
- data/docs/Fox/FXRegion.html +841 -0
- data/docs/Fox/FXRegistry.html +682 -0
- data/docs/Fox/FXReplaceDialog.html +648 -0
- data/docs/Fox/FXRootWindow.html +312 -0
- data/docs/Fox/FXRuler.html +2000 -0
- data/docs/Fox/FXRulerView.html +3997 -0
- data/docs/Fox/FXScintilla.html +49117 -0
- data/docs/Fox/FXScrollArea.html +1363 -0
- data/docs/Fox/FXScrollBar.html +1019 -0
- data/docs/Fox/FXScrollCorner.html +290 -0
- data/docs/Fox/FXScrollPane.html +499 -0
- data/docs/Fox/FXScrollWindow.html +409 -0
- data/docs/Fox/FXSearchDialog.html +382 -0
- data/docs/Fox/FXSegment.html +422 -0
- data/docs/Fox/FXSeparator.html +402 -0
- data/docs/Fox/FXSettings.html +1861 -0
- data/docs/Fox/FXShell.html +233 -0
- data/docs/Fox/FXShutter.html +472 -0
- data/docs/Fox/FXShutterItem.html +669 -0
- data/docs/Fox/FXSize.html +592 -0
- data/docs/Fox/FXSlider.html +1129 -0
- data/docs/Fox/FXSphered.html +906 -0
- data/docs/Fox/FXSpheref.html +906 -0
- data/docs/Fox/FXSpinner.html +2102 -0
- data/docs/Fox/FXSplashScreen.html +497 -0
- data/docs/Fox/FXSplashWindow.html +494 -0
- data/docs/Fox/FXSplitter.html +643 -0
- data/docs/Fox/FXSpring.html +517 -0
- data/docs/Fox/FXStatusBar.html +593 -0
- data/docs/Fox/FXStatusLine.html +754 -0
- data/docs/Fox/FXStream.html +1372 -0
- data/docs/Fox/FXStreamAllocError.html +148 -0
- data/docs/Fox/FXStreamEndError.html +148 -0
- data/docs/Fox/FXStreamError.html +259 -0
- data/docs/Fox/FXStreamFailureError.html +148 -0
- data/docs/Fox/FXStreamFormatError.html +148 -0
- data/docs/Fox/FXStreamFullError.html +148 -0
- data/docs/Fox/FXStreamNoReadError.html +148 -0
- data/docs/Fox/FXStreamNoWriteError.html +148 -0
- data/docs/Fox/FXStreamUnknownError.html +148 -0
- data/docs/Fox/FXStringDict.html +552 -0
- data/docs/Fox/FXSwitcher.html +619 -0
- data/docs/Fox/FXTGAIcon.html +450 -0
- data/docs/Fox/FXTGAImage.html +434 -0
- data/docs/Fox/FXTIFIcon.html +604 -0
- data/docs/Fox/FXTIFImage.html +588 -0
- data/docs/Fox/FXTabBar.html +644 -0
- data/docs/Fox/FXTabBook.html +373 -0
- data/docs/Fox/FXTabItem.html +478 -0
- data/docs/Fox/FXTable.html +10107 -0
- data/docs/Fox/FXTableItem.html +2195 -0
- data/docs/Fox/FXTablePos.html +360 -0
- data/docs/Fox/FXTableRange.html +360 -0
- data/docs/Fox/FXText.html +6870 -0
- data/docs/Fox/FXTextChange.html +492 -0
- data/docs/Fox/FXTextField.html +2016 -0
- data/docs/Fox/FXToggleButton.html +844 -0
- data/docs/Fox/FXToolBar.html +452 -0
- data/docs/Fox/FXToolBarGrip.html +584 -0
- data/docs/Fox/FXToolBarShell.html +788 -0
- data/docs/Fox/FXToolBarTab.html +729 -0
- data/docs/Fox/FXToolTip.html +761 -0
- data/docs/Fox/FXTopWindow.html +1716 -0
- data/docs/Fox/FXTranslator.html +481 -0
- data/docs/Fox/FXTreeItem.html +2813 -0
- data/docs/Fox/FXTreeList.html +5095 -0
- data/docs/Fox/FXTreeListBox.html +3080 -0
- data/docs/Fox/FXTriStateButton.html +681 -0
- data/docs/Fox/FXUndoList.html +2560 -0
- data/docs/Fox/FXVec2d.html +1450 -0
- data/docs/Fox/FXVec2f.html +1442 -0
- data/docs/Fox/FXVec3d.html +1649 -0
- data/docs/Fox/FXVec3f.html +1649 -0
- data/docs/Fox/FXVec4d.html +1858 -0
- data/docs/Fox/FXVec4f.html +1858 -0
- data/docs/Fox/FXVerticalFrame.html +359 -0
- data/docs/Fox/FXVerticalSeparator.html +349 -0
- data/docs/Fox/FXViewport.html +780 -0
- data/docs/Fox/FXVisual.html +1023 -0
- data/docs/Fox/FXWindow.html +9948 -0
- data/docs/Fox/FXWizard.html +1052 -0
- data/docs/Fox/FXXBMIcon.html +453 -0
- data/docs/Fox/FXXBMImage.html +437 -0
- data/docs/Fox/FXXPMIcon.html +450 -0
- data/docs/Fox/FXXPMImage.html +434 -0
- data/docs/Fox/NotifyHeader.html +286 -0
- data/docs/Fox/SCNotification.html +1438 -0
- data/docs/Fox/TextRange.html +281 -0
- data/docs/IRB.html +204 -0
- data/docs/Responder.html +693 -0
- data/docs/Responder2.html +225 -0
- data/docs/_index.html +2101 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.History.html +869 -0
- data/docs/file.README.html +104 -0
- data/docs/file_list.html +66 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +614 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +31043 -0
- data/docs/top-level-namespace.html +214 -0
- data/examples/canvasdemo.rb +5 -1
- data/examples/gltest.rb +162 -106
- data/examples/glviewer.rb +12 -8
- data/examples/inputs.rb +9 -4
- data/examples/pig.rb +2 -2
- data/examples/unicode.rb +6 -27
- data/ext/fox16_c/FXRbApp.cpp +3 -17
- data/ext/fox16_c/FXRuby.cpp +36 -46
- data/ext/fox16_c/extconf.rb +50 -34
- data/ext/fox16_c/impl.cpp +1 -1
- data/ext/fox16_c/include/FXRbApp.h +2 -2
- data/ext/fox16_c/include/FXRbCommon.h +0 -2
- data/ext/fox16_c/include/FXRbText.h +82 -2
- data/ext/fox16_c/include/FXRbTextVirtuals.h +22 -0
- data/ext/fox16_c/include/FXRuby.h +21 -3
- data/ext/fox16_c/include/gvl_wrappers.h +29 -11
- data/ext/fox16_c/make_impl.rb +1 -1
- data/fxruby.gemspec +2 -1
- data/lib/fox16/aliases.rb +3 -0
- data/lib/fox16/bitmapview.rb +0 -0
- data/lib/fox16/calendar.rb +6 -8
- data/lib/fox16/canvas.rb +93 -62
- data/lib/fox16/chore.rb +0 -0
- data/lib/fox16/colors.rb +0 -0
- data/lib/fox16/core.rb +18 -18
- data/lib/fox16/dict.rb +0 -0
- data/lib/fox16/glgroup.rb +5 -5
- data/lib/fox16/glshapes.rb +111 -99
- data/lib/fox16/input.rb +9 -7
- data/lib/fox16/irb.rb +0 -0
- data/lib/fox16/iterators.rb +0 -0
- data/lib/fox16/keys.rb +0 -0
- data/lib/fox16/missingdep.rb +0 -0
- data/lib/fox16/pseudokeyboard.rb +0 -0
- data/lib/fox16/pseudomouse.rb +0 -0
- data/lib/fox16/responder.rb +0 -0
- data/lib/fox16/responder2.rb +0 -0
- data/lib/fox16/scintilla.rb +0 -0
- data/lib/fox16/settings.rb +0 -0
- data/lib/fox16/signal.rb +0 -0
- data/lib/fox16/timeout.rb +0 -0
- data/lib/fox16/tkcompat.rb +0 -0
- data/lib/fox16/undolist.rb +8 -8
- data/lib/fox16/version.rb +1 -1
- data/rdoc-sources/FXGLVisual.rb +1 -1
- data/rdoc-sources/FXIconList.rb +2 -0
- data/rdoc-sources/FXImage.rb +5 -0
- data/rdoc-sources/FXList.rb +2 -0
- data/rdoc-sources/FXListBox.rb +1 -1
- data/rdoc-sources/FXText.rb +4 -2
- data/swig-interfaces/FXImage.i +9 -4
- data/swig-interfaces/FXMemoryBuffer.i +2 -2
- data/swig-interfaces/FXText.i +10 -8
- data/swig-interfaces/macros.i +9 -0
- data/test/TC_FXImage.rb +8 -0
- data/test/TC_FXList.rb +8 -8
- data/test/TC_FXText.rb +19 -0
- data/test/TC_FXVec4f.rb +26 -12
- metadata +300 -10
@@ -0,0 +1,2328 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Fox::FXImage
|
8
|
+
|
9
|
+
— FXRuby API Documentation
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Fox::FXImage";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (F)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Fox.html" title="Fox (module)">Fox</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">FXImage</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Fox::FXImage
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="FXDrawable.html" title="Fox::FXDrawable (class)">FXDrawable</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="FXId.html" title="Fox::FXId (class)">FXId</a></span></li>
|
80
|
+
|
81
|
+
<li class="next"><span class='object_link'><a href="FXDrawable.html" title="Fox::FXDrawable (class)">FXDrawable</a></span></li>
|
82
|
+
|
83
|
+
<li class="next">Fox::FXImage</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
</dl>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<dl>
|
102
|
+
<dt>Defined in:</dt>
|
103
|
+
<dd>rdoc-sources/FXImage.rb<span class="defines">,<br />
|
104
|
+
lib/fox16/core.rb</span>
|
105
|
+
</dd>
|
106
|
+
</dl>
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<h2>Overview</h2><div class="docstring">
|
111
|
+
<div class="discussion">
|
112
|
+
|
113
|
+
<p>An Image is a rectangular array of pixels. It supports two representations of these pixels: a client-side pixel buffer which is stored as an array of FXColor, and a server-side pixmap which is stored in an organization directly compatible with the screen, for fast drawing onto the device. The server-side representation is not directly accessible from the current process as it lives in the process of the X Server or GDI.</p>
|
114
|
+
|
115
|
+
<h3 id="label-Image+rendering+hints">Image rendering hints</h3>
|
116
|
+
<dl class="rdoc-list note-list"><dt><code>IMAGE_KEEP</code>
|
117
|
+
<dd>
|
118
|
+
<p>Keep pixel data in client. By default, FOX discards of the client-side pixel data for an image after you call create() for that image. When the <code>IMAGE_KEEP</code> option is set for FXImage (or one of its subclasses), the client-side buffer is maintained. You will typically want to set this option if you intend to do repeated re-rendering of the image after it has been created.</p>
|
119
|
+
</dd><dt><code>IMAGE_OWNED</code>
|
120
|
+
<dd>
|
121
|
+
<p>If <code>IMAGE_OWNED</code> is set, the image pixel data is copied into the image. If <code>IMAGE_OWNED</code> is not set, a image pixel string is directly used as memory buffer of the image, without copying the data. If pixel data is given as an Array instead of a string, data is copied in any case.</p>
|
122
|
+
</dd><dt><code>IMAGE_DITHER</code>
|
123
|
+
<dd>
|
124
|
+
<p>Dither image to look better</p>
|
125
|
+
</dd><dt><code>IMAGE_NEAREST</code>
|
126
|
+
<dd>
|
127
|
+
<p>Turn off dithering and map to nearest color</p>
|
128
|
+
</dd><dt><code>IMAGE_OPAQUE</code>
|
129
|
+
<dd>
|
130
|
+
<p>Force opaque background</p>
|
131
|
+
</dd><dt><code>IMAGE_ALPHACOLOR</code>
|
132
|
+
<dd>
|
133
|
+
<p>By default, FOX will use the transparency color obtained from the image file as the transparency (alpha) color. If you pass the <code>IMAGE_ALPHACOLOR</code> flag, the user-specified transparency color will be used instead.</p>
|
134
|
+
</dd><dt><code>IMAGE_SHMI</code>
|
135
|
+
<dd>
|
136
|
+
<p>Using shared memory image</p>
|
137
|
+
</dd><dt><code>IMAGE_SHMP</code>
|
138
|
+
<dd>
|
139
|
+
<p>Using shared memory pixmap</p>
|
140
|
+
</dd><dt><code>IMAGE_ALPHAGUESS</code>
|
141
|
+
<dd>
|
142
|
+
<p>Guess transparency color from corners</p>
|
143
|
+
</dd></dl>
|
144
|
+
|
145
|
+
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
<div class="tags">
|
149
|
+
|
150
|
+
|
151
|
+
</div><div id="subclasses">
|
152
|
+
<h2>Direct Known Subclasses</h2>
|
153
|
+
<p class="children"><span class='object_link'><a href="FXBMPImage.html" title="Fox::FXBMPImage (class)">FXBMPImage</a></span>, <span class='object_link'><a href="FXGIFImage.html" title="Fox::FXGIFImage (class)">FXGIFImage</a></span>, <span class='object_link'><a href="FXICOImage.html" title="Fox::FXICOImage (class)">FXICOImage</a></span>, <span class='object_link'><a href="FXIcon.html" title="Fox::FXIcon (class)">FXIcon</a></span>, <span class='object_link'><a href="FXJPGImage.html" title="Fox::FXJPGImage (class)">FXJPGImage</a></span>, <span class='object_link'><a href="FXPCXImage.html" title="Fox::FXPCXImage (class)">FXPCXImage</a></span>, <span class='object_link'><a href="FXPNGImage.html" title="Fox::FXPNGImage (class)">FXPNGImage</a></span>, <span class='object_link'><a href="FXPPMImage.html" title="Fox::FXPPMImage (class)">FXPPMImage</a></span>, <span class='object_link'><a href="FXRGBImage.html" title="Fox::FXRGBImage (class)">FXRGBImage</a></span>, <span class='object_link'><a href="FXTGAImage.html" title="Fox::FXTGAImage (class)">FXTGAImage</a></span>, <span class='object_link'><a href="FXTIFImage.html" title="Fox::FXTIFImage (class)">FXTIFImage</a></span>, <span class='object_link'><a href="FXXBMImage.html" title="Fox::FXXBMImage (class)">FXXBMImage</a></span>, <span class='object_link'><a href="FXXPMImage.html" title="Fox::FXXPMImage (class)">FXXPMImage</a></span></p>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong> ⇒ Object </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="note title readonly">readonly</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'><dl class="rdoc-list label-list"><dt>deprecated
|
185
|
+
<dd>
|
186
|
+
<p>Pixel data <span class='object_link'><a href="FXMemoryBuffer.html" title="Fox::FXMemoryBuffer (class)">FXMemoryBuffer</a></span>.</p>
|
187
|
+
</dd></dl>
|
188
|
+
</div></span>
|
189
|
+
|
190
|
+
</li>
|
191
|
+
|
192
|
+
|
193
|
+
<li class="public ">
|
194
|
+
<span class="summary_signature">
|
195
|
+
|
196
|
+
<a href="#dataPtr-instance_method" title="#dataPtr (instance method)">#<strong>dataPtr</strong> ⇒ Object </a>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</span>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<span class="note title readonly">readonly</span>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<span class="summary_desc"><div class='inline'>
|
216
|
+
<p>The pointer to the raw color representation of all image pixels.</p>
|
217
|
+
</div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> ⇒ Object </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
<span class="summary_desc"><div class='inline'>
|
243
|
+
<p>Option flags [Integer].</p>
|
244
|
+
</div></span>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li class="public ">
|
250
|
+
<span class="summary_signature">
|
251
|
+
|
252
|
+
<a href="#pixels-instance_method" title="#pixels (instance method)">#<strong>pixels</strong> ⇒ Object </a>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</span>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<span class="summary_desc"><div class='inline'>
|
270
|
+
<p>Array of colors of all image pixels.</p>
|
271
|
+
</div></span>
|
272
|
+
|
273
|
+
</li>
|
274
|
+
|
275
|
+
|
276
|
+
</ul>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="FXDrawable.html" title="Fox::FXDrawable (class)">FXDrawable</a></span></h3>
|
283
|
+
<p class="inherited"><span class='object_link'><a href="FXDrawable.html#height-instance_method" title="Fox::FXDrawable#height (method)">#height</a></span>, <span class='object_link'><a href="FXDrawable.html#visual-instance_method" title="Fox::FXDrawable#visual (method)">#visual</a></span>, <span class='object_link'><a href="FXDrawable.html#width-instance_method" title="Fox::FXDrawable#width (method)">#width</a></span></p>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="FXId.html" title="Fox::FXId (class)">FXId</a></span></h3>
|
288
|
+
<p class="inherited"><span class='object_link'><a href="FXId.html#app-instance_method" title="Fox::FXId#app (method)">#app</a></span>, <span class='object_link'><a href="FXId.html#userData-instance_method" title="Fox::FXId#userData (method)">#userData</a></span>, <span class='object_link'><a href="FXId.html#xid-instance_method" title="Fox::FXId#xid (method)">#xid</a></span></p>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
<h2>
|
293
|
+
Instance Method Summary
|
294
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
295
|
+
</h2>
|
296
|
+
|
297
|
+
<ul class="summary">
|
298
|
+
|
299
|
+
<li class="public ">
|
300
|
+
<span class="summary_signature">
|
301
|
+
|
302
|
+
<a href="#blend-instance_method" title="#blend (instance method)">#<strong>blend</strong>(color) ⇒ Object </a>
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
</span>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
<span class="summary_desc"><div class='inline'>
|
317
|
+
<p>Blend image over uniform color.</p>
|
318
|
+
</div></span>
|
319
|
+
|
320
|
+
</li>
|
321
|
+
|
322
|
+
|
323
|
+
<li class="public ">
|
324
|
+
<span class="summary_signature">
|
325
|
+
|
326
|
+
<a href="#crop-instance_method" title="#crop (instance method)">#<strong>crop</strong>(x, y, w, h, color = 0) ⇒ Object </a>
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
</span>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<span class="summary_desc"><div class='inline'>
|
341
|
+
<p>Crop image to given rectangle and then re-render the server-side image from the client-side pixel buffer.</p>
|
342
|
+
</div></span>
|
343
|
+
|
344
|
+
</li>
|
345
|
+
|
346
|
+
|
347
|
+
<li class="public ">
|
348
|
+
<span class="summary_signature">
|
349
|
+
|
350
|
+
<a href="#fade-instance_method" title="#fade (instance method)">#<strong>fade</strong>(color, factor = 255) ⇒ Object </a>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
</span>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
<span class="summary_desc"><div class='inline'>
|
365
|
+
<p>Fade an image to a certain color by a certain factor.</p>
|
366
|
+
</div></span>
|
367
|
+
|
368
|
+
</li>
|
369
|
+
|
370
|
+
|
371
|
+
<li class="public ">
|
372
|
+
<span class="summary_signature">
|
373
|
+
|
374
|
+
<a href="#fill-instance_method" title="#fill (instance method)">#<strong>fill</strong>(color) ⇒ Object </a>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
</span>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<span class="summary_desc"><div class='inline'>
|
389
|
+
<p>Fill image with uniform color.</p>
|
390
|
+
</div></span>
|
391
|
+
|
392
|
+
</li>
|
393
|
+
|
394
|
+
|
395
|
+
<li class="public ">
|
396
|
+
<span class="summary_signature">
|
397
|
+
|
398
|
+
<a href="#getPixel-instance_method" title="#getPixel (instance method)">#<strong>getPixel</strong>(x, y) ⇒ Object </a>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
</span>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<span class="summary_desc"><div class='inline'>
|
413
|
+
<p>Return the color of the pixel at (<em>x</em>, <em>y</em>).</p>
|
414
|
+
</div></span>
|
415
|
+
|
416
|
+
</li>
|
417
|
+
|
418
|
+
|
419
|
+
<li class="public ">
|
420
|
+
<span class="summary_signature">
|
421
|
+
|
422
|
+
<a href="#gradient-instance_method" title="#gradient (instance method)">#<strong>gradient</strong>(topleft, topright, bottomleft, bottomright) ⇒ Object </a>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</span>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
<span class="summary_desc"><div class='inline'>
|
437
|
+
<p>Fill image using a bilinear gradient.</p>
|
438
|
+
</div></span>
|
439
|
+
|
440
|
+
</li>
|
441
|
+
|
442
|
+
|
443
|
+
<li class="public ">
|
444
|
+
<span class="summary_signature">
|
445
|
+
|
446
|
+
<a href="#hasAlpha%3F-instance_method" title="#hasAlpha? (instance method)">#<strong>hasAlpha?</strong> ⇒ Boolean </a>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
</span>
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
<span class="summary_desc"><div class='inline'>
|
461
|
+
<p>Scan the image and return <code>false</code> if it's fully opaque.</p>
|
462
|
+
</div></span>
|
463
|
+
|
464
|
+
</li>
|
465
|
+
|
466
|
+
|
467
|
+
<li class="public ">
|
468
|
+
<span class="summary_signature">
|
469
|
+
|
470
|
+
<a href="#hgradient-instance_method" title="#hgradient (instance method)">#<strong>hgradient</strong>(left, right) ⇒ Object </a>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
</span>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
<span class="summary_desc"><div class='inline'>
|
485
|
+
<p>Fill image using a horizontal gradient.</p>
|
486
|
+
</div></span>
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
|
491
|
+
<li class="public ">
|
492
|
+
<span class="summary_signature">
|
493
|
+
|
494
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(a, pix, *args) ⇒ FXImage </a>
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
</span>
|
499
|
+
|
500
|
+
|
501
|
+
<span class="note title constructor">constructor</span>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
<span class="summary_desc"><div class='inline'>
|
511
|
+
<p>Create an image.</p>
|
512
|
+
</div></span>
|
513
|
+
|
514
|
+
</li>
|
515
|
+
|
516
|
+
|
517
|
+
<li class="public ">
|
518
|
+
<span class="summary_signature">
|
519
|
+
|
520
|
+
<a href="#initialize_without_data_string-instance_method" title="#initialize_without_data_string (instance method)">#<strong>initialize_without_data_string</strong> ⇒ FXImage </a>
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</span>
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
<span class="summary_desc"><div class='inline'>
|
535
|
+
<p>Create an image.</p>
|
536
|
+
</div></span>
|
537
|
+
|
538
|
+
</li>
|
539
|
+
|
540
|
+
|
541
|
+
<li class="public ">
|
542
|
+
<span class="summary_signature">
|
543
|
+
|
544
|
+
<a href="#loadPixels-instance_method" title="#loadPixels (instance method)">#<strong>loadPixels</strong>(store) ⇒ Object </a>
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
</span>
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
<span class="summary_desc"><div class='inline'>
|
559
|
+
<p>Load pixel data from a stream.</p>
|
560
|
+
</div></span>
|
561
|
+
|
562
|
+
</li>
|
563
|
+
|
564
|
+
|
565
|
+
<li class="public ">
|
566
|
+
<span class="summary_signature">
|
567
|
+
|
568
|
+
<a href="#mirror-instance_method" title="#mirror (instance method)">#<strong>mirror</strong>(horizontal, vertical) ⇒ Object </a>
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
</span>
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
<span class="summary_desc"><div class='inline'>
|
583
|
+
<p>Mirror image horizontally and/or vertically and then re-render the server-side image from the client-side pixel buffer.</p>
|
584
|
+
</div></span>
|
585
|
+
|
586
|
+
</li>
|
587
|
+
|
588
|
+
|
589
|
+
<li class="public ">
|
590
|
+
<span class="summary_signature">
|
591
|
+
|
592
|
+
<a href="#pixel_string-instance_method" title="#pixel_string (instance method)">#<strong>pixel_string</strong>(offset = nil, size = nil) ⇒ Object </a>
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
</span>
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
<span class="summary_desc"><div class='inline'>
|
607
|
+
<p>Return a String of the raw color representation of all image pixels.</p>
|
608
|
+
</div></span>
|
609
|
+
|
610
|
+
</li>
|
611
|
+
|
612
|
+
|
613
|
+
<li class="public ">
|
614
|
+
<span class="summary_signature">
|
615
|
+
|
616
|
+
<a href="#release-instance_method" title="#release (instance method)">#<strong>release</strong> ⇒ Object </a>
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
</span>
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
<span class="summary_desc"><div class='inline'>
|
631
|
+
<p>Release the client-side pixels buffer, free it if it was owned (i.e. if the <code>IMAGE_OWNED</code> option is set)..</p>
|
632
|
+
</div></span>
|
633
|
+
|
634
|
+
</li>
|
635
|
+
|
636
|
+
|
637
|
+
<li class="public ">
|
638
|
+
<span class="summary_signature">
|
639
|
+
|
640
|
+
<a href="#render-instance_method" title="#render (instance method)">#<strong>render</strong> ⇒ Object </a>
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
</span>
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
<span class="summary_desc"><div class='inline'>
|
655
|
+
<p>Render the image from client-side pixel buffer, if there is data and if the image width and height are greater than zero.</p>
|
656
|
+
</div></span>
|
657
|
+
|
658
|
+
</li>
|
659
|
+
|
660
|
+
|
661
|
+
<li class="public ">
|
662
|
+
<span class="summary_signature">
|
663
|
+
|
664
|
+
<a href="#restore-instance_method" title="#restore (instance method)">#<strong>restore</strong> ⇒ Object </a>
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
</span>
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
<span class="summary_desc"><div class='inline'>
|
679
|
+
<p>Restore client-side pixel buffer from image.</p>
|
680
|
+
</div></span>
|
681
|
+
|
682
|
+
</li>
|
683
|
+
|
684
|
+
|
685
|
+
<li class="public ">
|
686
|
+
<span class="summary_signature">
|
687
|
+
|
688
|
+
<a href="#rotate-instance_method" title="#rotate (instance method)">#<strong>rotate</strong>(degrees) ⇒ Object </a>
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
</span>
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
<span class="summary_desc"><div class='inline'>
|
703
|
+
<p>Rotate image counter-clockwise by some number of degrees and then re-render the server-side image from the client-side pixel buffer.</p>
|
704
|
+
</div></span>
|
705
|
+
|
706
|
+
</li>
|
707
|
+
|
708
|
+
|
709
|
+
<li class="public ">
|
710
|
+
<span class="summary_signature">
|
711
|
+
|
712
|
+
<a href="#savePixels-instance_method" title="#savePixels (instance method)">#<strong>savePixels</strong>(store) ⇒ Object </a>
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
</span>
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
<span class="summary_desc"><div class='inline'>
|
727
|
+
<p>Save pixel data to a stream.</p>
|
728
|
+
</div></span>
|
729
|
+
|
730
|
+
</li>
|
731
|
+
|
732
|
+
|
733
|
+
<li class="public ">
|
734
|
+
<span class="summary_signature">
|
735
|
+
|
736
|
+
<a href="#scale-instance_method" title="#scale (instance method)">#<strong>scale</strong>(w, h, quality = 0) ⇒ Object </a>
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
</span>
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
<span class="summary_desc"><div class='inline'>
|
751
|
+
<p>Rescale pixels image to the specified width and height and then re-render the server-side image from the client-side pixel buffer.</p>
|
752
|
+
</div></span>
|
753
|
+
|
754
|
+
</li>
|
755
|
+
|
756
|
+
|
757
|
+
<li class="public ">
|
758
|
+
<span class="summary_signature">
|
759
|
+
|
760
|
+
<a href="#setPixel-instance_method" title="#setPixel (instance method)">#<strong>setPixel</strong>(x, y, clr) ⇒ Object </a>
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
</span>
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
<span class="summary_desc"><div class='inline'>
|
775
|
+
<p>Set pixel at (<em>x</em>, <em>y</em>) to <em>clr</em>.</p>
|
776
|
+
</div></span>
|
777
|
+
|
778
|
+
</li>
|
779
|
+
|
780
|
+
|
781
|
+
<li class="public ">
|
782
|
+
<span class="summary_signature">
|
783
|
+
|
784
|
+
<a href="#setPixels-instance_method" title="#setPixels (instance method)">#<strong>setPixels</strong>(pix, *args) ⇒ Object </a>
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
</span>
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
<span class="summary_desc"><div class='inline'>
|
799
|
+
<p>Populate the image with new pixel data of the same size or of a new size.</p>
|
800
|
+
</div></span>
|
801
|
+
|
802
|
+
</li>
|
803
|
+
|
804
|
+
|
805
|
+
<li class="public ">
|
806
|
+
<span class="summary_signature">
|
807
|
+
|
808
|
+
<a href="#setPixels_without_data_string-instance_method" title="#setPixels_without_data_string (instance method)">#<strong>setPixels_without_data_string</strong> ⇒ Object </a>
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
</span>
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
<span class="summary_desc"><div class='inline'>
|
823
|
+
<p>Populate the image with new pixel data of the same size or of a new size.</p>
|
824
|
+
</div></span>
|
825
|
+
|
826
|
+
</li>
|
827
|
+
|
828
|
+
|
829
|
+
<li class="public ">
|
830
|
+
<span class="summary_signature">
|
831
|
+
|
832
|
+
<a href="#vgradient-instance_method" title="#vgradient (instance method)">#<strong>vgradient</strong>(top, bottom) ⇒ Object </a>
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
</span>
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
<span class="summary_desc"><div class='inline'>
|
847
|
+
<p>Fill image using a vertical gradient.</p>
|
848
|
+
</div></span>
|
849
|
+
|
850
|
+
</li>
|
851
|
+
|
852
|
+
|
853
|
+
<li class="public ">
|
854
|
+
<span class="summary_signature">
|
855
|
+
|
856
|
+
<a href="#xshear-instance_method" title="#xshear (instance method)">#<strong>xshear</strong>(shear, color = 0) ⇒ Object </a>
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
</span>
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
<span class="summary_desc"><div class='inline'>
|
871
|
+
<p>Shear image horizontally and then re-render the server-side image from the client-side pixel buffer.</p>
|
872
|
+
</div></span>
|
873
|
+
|
874
|
+
</li>
|
875
|
+
|
876
|
+
|
877
|
+
<li class="public ">
|
878
|
+
<span class="summary_signature">
|
879
|
+
|
880
|
+
<a href="#yshear-instance_method" title="#yshear (instance method)">#<strong>yshear</strong>(shear, color = 0) ⇒ Object </a>
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
</span>
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
<span class="summary_desc"><div class='inline'>
|
895
|
+
<p>Shear image verticallyand then re-render the server-side image from the client-side pixel buffer.</p>
|
896
|
+
</div></span>
|
897
|
+
|
898
|
+
</li>
|
899
|
+
|
900
|
+
|
901
|
+
</ul>
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
|
913
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXDrawable.html" title="Fox::FXDrawable (class)">FXDrawable</a></span></h3>
|
914
|
+
<p class="inherited"><span class='object_link'><a href="FXDrawable.html#resize-instance_method" title="Fox::FXDrawable#resize (method)">#resize</a></span></p>
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXId.html" title="Fox::FXId (class)">FXId</a></span></h3>
|
925
|
+
<p class="inherited"><span class='object_link'><a href="FXId.html#create-instance_method" title="Fox::FXId#create (method)">#create</a></span>, <span class='object_link'><a href="FXId.html#created%3F-instance_method" title="Fox::FXId#created? (method)">#created?</a></span>, <span class='object_link'><a href="FXId.html#destroy-instance_method" title="Fox::FXId#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="FXId.html#detach-instance_method" title="Fox::FXId#detach (method)">#detach</a></span>, <span class='object_link'><a href="FXId.html#runOnUiThread-instance_method" title="Fox::FXId#runOnUiThread (method)">#runOnUiThread</a></span></p>
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="FXObject.html" title="Fox::FXObject (class)">FXObject</a></span></h3>
|
936
|
+
<p class="inherited"><span class='object_link'><a href="FXObject.html#bind-instance_method" title="Fox::FXObject#bind (method)">#bind</a></span>, <span class='object_link'><a href="FXObject.html#handle-instance_method" title="Fox::FXObject#handle (method)">#handle</a></span>, <span class='object_link'><a href="FXObject.html#load-instance_method" title="Fox::FXObject#load (method)">#load</a></span>, <span class='object_link'><a href="FXObject.html#save-instance_method" title="Fox::FXObject#save (method)">#save</a></span>, <span class='object_link'><a href="FXObject.html#subclasses-class_method" title="Fox::FXObject.subclasses (method)">subclasses</a></span></p>
|
937
|
+
<div id="constructor_details" class="method_details_list">
|
938
|
+
<h2>Constructor Details</h2>
|
939
|
+
|
940
|
+
<div class="method_details first">
|
941
|
+
<h3 class="signature first" id="initialize-instance_method">
|
942
|
+
|
943
|
+
#<strong>initialize</strong>(a, pix, *args) ⇒ <tt><span class='object_link'><a href="" title="Fox::FXImage (class)">FXImage</a></span></tt>
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
</h3><div class="docstring">
|
950
|
+
<div class="discussion">
|
951
|
+
|
952
|
+
<p>Create an image. If a client-side pixel buffer has been specified, the image owns the pixel buffer. If the <code>IMAGE_OWNED</code> flag is set but a <code>nil</code> pixel buffer is passed, a pixel buffer will be automatically created and will be owned by the image. The flags <code>IMAGE_SHMI</code> and <code>IMAGE_SHMP</code> may be specified for large images to instruct <span class='object_link'><a href="#render-instance_method" title="Fox::FXImage#render (method)">#render</a></span> to use shared memory to communicate with the server.</p>
|
953
|
+
|
954
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
955
|
+
<dl class="rdoc-list note-list"><dt><code>a</code>
|
956
|
+
<dd>
|
957
|
+
<p>an application instance <span class='object_link'><a href="FXApp.html" title="Fox::FXApp (class)">Fox::FXApp</a></span></p>
|
958
|
+
</dd><dt><code>pixels</code>
|
959
|
+
<dd>
|
960
|
+
<p>pixels [Array of FXColor values or string of raw [RGBA] values]</p>
|
961
|
+
</dd><dt><code>opts</code>
|
962
|
+
<dd>
|
963
|
+
<p>image options [Integer]</p>
|
964
|
+
</dd><dt><code>width</code>
|
965
|
+
<dd>
|
966
|
+
<p>image width [Integer]</p>
|
967
|
+
</dd><dt><code>height</code>
|
968
|
+
<dd>
|
969
|
+
<p>image height [Integer]</p>
|
970
|
+
</dd></dl>
|
971
|
+
|
972
|
+
|
973
|
+
</div>
|
974
|
+
</div>
|
975
|
+
<div class="tags">
|
976
|
+
|
977
|
+
|
978
|
+
</div><table class="source_code">
|
979
|
+
<tr>
|
980
|
+
<td>
|
981
|
+
<pre class="lines">
|
982
|
+
|
983
|
+
|
984
|
+
77
|
985
|
+
78</pre>
|
986
|
+
</td>
|
987
|
+
<td>
|
988
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 77</span>
|
989
|
+
|
990
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_pixels'>pixels</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span> <span class='comment'># :yields: theImage
|
991
|
+
</span><span class='kw'>end</span></pre>
|
992
|
+
</td>
|
993
|
+
</tr>
|
994
|
+
</table>
|
995
|
+
</div>
|
996
|
+
|
997
|
+
</div>
|
998
|
+
|
999
|
+
<div id="instance_attr_details" class="attr_details">
|
1000
|
+
<h2>Instance Attribute Details</h2>
|
1001
|
+
|
1002
|
+
|
1003
|
+
<span id=""></span>
|
1004
|
+
<div class="method_details first">
|
1005
|
+
<h3 class="signature first" id="data-instance_method">
|
1006
|
+
|
1007
|
+
#<strong>data</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
</h3><div class="docstring">
|
1014
|
+
<div class="discussion">
|
1015
|
+
<dl class="rdoc-list label-list"><dt>deprecated
|
1016
|
+
<dd>
|
1017
|
+
<p>Pixel data <span class='object_link'><a href="FXMemoryBuffer.html" title="Fox::FXMemoryBuffer (class)">Fox::FXMemoryBuffer</a></span></p>
|
1018
|
+
</dd></dl>
|
1019
|
+
|
1020
|
+
|
1021
|
+
</div>
|
1022
|
+
</div>
|
1023
|
+
<div class="tags">
|
1024
|
+
|
1025
|
+
|
1026
|
+
</div><table class="source_code">
|
1027
|
+
<tr>
|
1028
|
+
<td>
|
1029
|
+
<pre class="lines">
|
1030
|
+
|
1031
|
+
|
1032
|
+
46
|
1033
|
+
47
|
1034
|
+
48</pre>
|
1035
|
+
</td>
|
1036
|
+
<td>
|
1037
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 46</span>
|
1038
|
+
|
1039
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span>
|
1040
|
+
<span class='ivar'>@data</span>
|
1041
|
+
<span class='kw'>end</span></pre>
|
1042
|
+
</td>
|
1043
|
+
</tr>
|
1044
|
+
</table>
|
1045
|
+
</div>
|
1046
|
+
|
1047
|
+
|
1048
|
+
<span id=""></span>
|
1049
|
+
<div class="method_details ">
|
1050
|
+
<h3 class="signature " id="dataPtr-instance_method">
|
1051
|
+
|
1052
|
+
#<strong>dataPtr</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
1053
|
+
|
1054
|
+
|
1055
|
+
|
1056
|
+
|
1057
|
+
|
1058
|
+
</h3><div class="docstring">
|
1059
|
+
<div class="discussion">
|
1060
|
+
|
1061
|
+
<p>The pointer to the raw color representation of all image pixels.</p>
|
1062
|
+
|
1063
|
+
<p>It can be used to pass raw image data to FFI, Fiddle or OpenGL.</p>
|
1064
|
+
|
1065
|
+
|
1066
|
+
</div>
|
1067
|
+
</div>
|
1068
|
+
<div class="tags">
|
1069
|
+
|
1070
|
+
|
1071
|
+
</div><table class="source_code">
|
1072
|
+
<tr>
|
1073
|
+
<td>
|
1074
|
+
<pre class="lines">
|
1075
|
+
|
1076
|
+
|
1077
|
+
51
|
1078
|
+
52
|
1079
|
+
53</pre>
|
1080
|
+
</td>
|
1081
|
+
<td>
|
1082
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 51</span>
|
1083
|
+
|
1084
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dataPtr'>dataPtr</span>
|
1085
|
+
<span class='ivar'>@dataPtr</span>
|
1086
|
+
<span class='kw'>end</span></pre>
|
1087
|
+
</td>
|
1088
|
+
</tr>
|
1089
|
+
</table>
|
1090
|
+
</div>
|
1091
|
+
|
1092
|
+
|
1093
|
+
<span id="options=-instance_method"></span>
|
1094
|
+
<div class="method_details ">
|
1095
|
+
<h3 class="signature " id="options-instance_method">
|
1096
|
+
|
1097
|
+
#<strong>options</strong> ⇒ <tt>Object</tt>
|
1098
|
+
|
1099
|
+
|
1100
|
+
|
1101
|
+
|
1102
|
+
|
1103
|
+
</h3><div class="docstring">
|
1104
|
+
<div class="discussion">
|
1105
|
+
|
1106
|
+
<p>Option flags [Integer]</p>
|
1107
|
+
|
1108
|
+
|
1109
|
+
</div>
|
1110
|
+
</div>
|
1111
|
+
<div class="tags">
|
1112
|
+
|
1113
|
+
|
1114
|
+
</div><table class="source_code">
|
1115
|
+
<tr>
|
1116
|
+
<td>
|
1117
|
+
<pre class="lines">
|
1118
|
+
|
1119
|
+
|
1120
|
+
58
|
1121
|
+
59
|
1122
|
+
60</pre>
|
1123
|
+
</td>
|
1124
|
+
<td>
|
1125
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 58</span>
|
1126
|
+
|
1127
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
|
1128
|
+
<span class='ivar'>@options</span>
|
1129
|
+
<span class='kw'>end</span></pre>
|
1130
|
+
</td>
|
1131
|
+
</tr>
|
1132
|
+
</table>
|
1133
|
+
</div>
|
1134
|
+
|
1135
|
+
|
1136
|
+
<span id="pixels=-instance_method"></span>
|
1137
|
+
<div class="method_details ">
|
1138
|
+
<h3 class="signature " id="pixels-instance_method">
|
1139
|
+
|
1140
|
+
#<strong>pixels</strong> ⇒ <tt>Object</tt>
|
1141
|
+
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
|
1146
|
+
</h3><div class="docstring">
|
1147
|
+
<div class="discussion">
|
1148
|
+
|
1149
|
+
<p>Array of colors of all image pixels. Can also be written as String of raw [RGBA] values.</p>
|
1150
|
+
|
1151
|
+
|
1152
|
+
</div>
|
1153
|
+
</div>
|
1154
|
+
<div class="tags">
|
1155
|
+
|
1156
|
+
|
1157
|
+
</div><table class="source_code">
|
1158
|
+
<tr>
|
1159
|
+
<td>
|
1160
|
+
<pre class="lines">
|
1161
|
+
|
1162
|
+
|
1163
|
+
54
|
1164
|
+
55
|
1165
|
+
56</pre>
|
1166
|
+
</td>
|
1167
|
+
<td>
|
1168
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 54</span>
|
1169
|
+
|
1170
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pixels'>pixels</span>
|
1171
|
+
<span class='ivar'>@pixels</span>
|
1172
|
+
<span class='kw'>end</span></pre>
|
1173
|
+
</td>
|
1174
|
+
</tr>
|
1175
|
+
</table>
|
1176
|
+
</div>
|
1177
|
+
|
1178
|
+
</div>
|
1179
|
+
|
1180
|
+
|
1181
|
+
<div id="instance_method_details" class="method_details_list">
|
1182
|
+
<h2>Instance Method Details</h2>
|
1183
|
+
|
1184
|
+
|
1185
|
+
<div class="method_details first">
|
1186
|
+
<h3 class="signature first" id="blend-instance_method">
|
1187
|
+
|
1188
|
+
#<strong>blend</strong>(color) ⇒ <tt>Object</tt>
|
1189
|
+
|
1190
|
+
|
1191
|
+
|
1192
|
+
|
1193
|
+
|
1194
|
+
</h3><div class="docstring">
|
1195
|
+
<div class="discussion">
|
1196
|
+
|
1197
|
+
<p>Blend image over uniform color.</p>
|
1198
|
+
|
1199
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1200
|
+
<dl class="rdoc-list note-list"><dt><code>color</code>
|
1201
|
+
<dd>
|
1202
|
+
<p>the blended color <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1203
|
+
</dd></dl>
|
1204
|
+
|
1205
|
+
|
1206
|
+
</div>
|
1207
|
+
</div>
|
1208
|
+
<div class="tags">
|
1209
|
+
|
1210
|
+
|
1211
|
+
</div><table class="source_code">
|
1212
|
+
<tr>
|
1213
|
+
<td>
|
1214
|
+
<pre class="lines">
|
1215
|
+
|
1216
|
+
|
1217
|
+
292</pre>
|
1218
|
+
</td>
|
1219
|
+
<td>
|
1220
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 292</span>
|
1221
|
+
|
1222
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_blend'>blend</span><span class='lparen'>(</span><span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1223
|
+
</td>
|
1224
|
+
</tr>
|
1225
|
+
</table>
|
1226
|
+
</div>
|
1227
|
+
|
1228
|
+
<div class="method_details ">
|
1229
|
+
<h3 class="signature " id="crop-instance_method">
|
1230
|
+
|
1231
|
+
#<strong>crop</strong>(x, y, w, h, color = 0) ⇒ <tt>Object</tt>
|
1232
|
+
|
1233
|
+
|
1234
|
+
|
1235
|
+
|
1236
|
+
|
1237
|
+
</h3><div class="docstring">
|
1238
|
+
<div class="discussion">
|
1239
|
+
|
1240
|
+
<p>Crop image to given rectangle and then re-render the server-side image from the client-side pixel buffer. This method calls resize() to adjust the client and server side representations. The new image may be smaller or larger than the old one; blank areas are filled with color. There must be at least one pixel of overlap between the old and the new image.</p>
|
1241
|
+
|
1242
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1243
|
+
<dl class="rdoc-list note-list"><dt><code>x</code>
|
1244
|
+
<dd>
|
1245
|
+
<p>x-coordinate for top left corner of the clip rectangle [Integer]</p>
|
1246
|
+
</dd><dt><code>y</code>
|
1247
|
+
<dd>
|
1248
|
+
<p>y-coordinate for top left corner of the clip rectangle [Integer]</p>
|
1249
|
+
</dd><dt><code>width</code>
|
1250
|
+
<dd>
|
1251
|
+
<p>width of the clip rectangle [Integer]</p>
|
1252
|
+
</dd><dt><code>height</code>
|
1253
|
+
<dd>
|
1254
|
+
<p>height of the clip rectangle [Integer]</p>
|
1255
|
+
</dd><dt><code>color</code>
|
1256
|
+
<dd>
|
1257
|
+
<p>fill color for blank areas after crop <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1258
|
+
</dd></dl>
|
1259
|
+
|
1260
|
+
|
1261
|
+
</div>
|
1262
|
+
</div>
|
1263
|
+
<div class="tags">
|
1264
|
+
|
1265
|
+
|
1266
|
+
</div><table class="source_code">
|
1267
|
+
<tr>
|
1268
|
+
<td>
|
1269
|
+
<pre class="lines">
|
1270
|
+
|
1271
|
+
|
1272
|
+
210</pre>
|
1273
|
+
</td>
|
1274
|
+
<td>
|
1275
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 210</span>
|
1276
|
+
|
1277
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_crop'>crop</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_w'>w</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1278
|
+
</td>
|
1279
|
+
</tr>
|
1280
|
+
</table>
|
1281
|
+
</div>
|
1282
|
+
|
1283
|
+
<div class="method_details ">
|
1284
|
+
<h3 class="signature " id="fade-instance_method">
|
1285
|
+
|
1286
|
+
#<strong>fade</strong>(color, factor = 255) ⇒ <tt>Object</tt>
|
1287
|
+
|
1288
|
+
|
1289
|
+
|
1290
|
+
|
1291
|
+
|
1292
|
+
</h3><div class="docstring">
|
1293
|
+
<div class="discussion">
|
1294
|
+
|
1295
|
+
<p>Fade an image to a certain color by a certain factor. The <em>factor</em> is some integer value between 0 and 255 inclusive, where a factor of 255 indicates no fading and a factor of zero indicates that the image is completely faded to the fade <em>color</em>.</p>
|
1296
|
+
|
1297
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1298
|
+
<dl class="rdoc-list note-list"><dt><code>color</code>
|
1299
|
+
<dd>
|
1300
|
+
<p>the fade color <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1301
|
+
</dd><dt><code>factor</code>
|
1302
|
+
<dd>
|
1303
|
+
<p>fading factor [Integer]</p>
|
1304
|
+
</dd></dl>
|
1305
|
+
|
1306
|
+
|
1307
|
+
</div>
|
1308
|
+
</div>
|
1309
|
+
<div class="tags">
|
1310
|
+
|
1311
|
+
|
1312
|
+
</div><table class="source_code">
|
1313
|
+
<tr>
|
1314
|
+
<td>
|
1315
|
+
<pre class="lines">
|
1316
|
+
|
1317
|
+
|
1318
|
+
225</pre>
|
1319
|
+
</td>
|
1320
|
+
<td>
|
1321
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 225</span>
|
1322
|
+
|
1323
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fade'>fade</span><span class='lparen'>(</span><span class='id identifier rubyid_color'>color</span><span class='comma'>,</span> <span class='id identifier rubyid_factor'>factor</span><span class='op'>=</span><span class='int'>255</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1324
|
+
</td>
|
1325
|
+
</tr>
|
1326
|
+
</table>
|
1327
|
+
</div>
|
1328
|
+
|
1329
|
+
<div class="method_details ">
|
1330
|
+
<h3 class="signature " id="fill-instance_method">
|
1331
|
+
|
1332
|
+
#<strong>fill</strong>(color) ⇒ <tt>Object</tt>
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
|
1337
|
+
|
1338
|
+
</h3><div class="docstring">
|
1339
|
+
<div class="discussion">
|
1340
|
+
|
1341
|
+
<p>Fill image with uniform color.</p>
|
1342
|
+
|
1343
|
+
|
1344
|
+
</div>
|
1345
|
+
</div>
|
1346
|
+
<div class="tags">
|
1347
|
+
|
1348
|
+
|
1349
|
+
</div><table class="source_code">
|
1350
|
+
<tr>
|
1351
|
+
<td>
|
1352
|
+
<pre class="lines">
|
1353
|
+
|
1354
|
+
|
1355
|
+
213</pre>
|
1356
|
+
</td>
|
1357
|
+
<td>
|
1358
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 213</span>
|
1359
|
+
|
1360
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fill'>fill</span><span class='lparen'>(</span><span class='id identifier rubyid_color'>color</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1361
|
+
</td>
|
1362
|
+
</tr>
|
1363
|
+
</table>
|
1364
|
+
</div>
|
1365
|
+
|
1366
|
+
<div class="method_details ">
|
1367
|
+
<h3 class="signature " id="getPixel-instance_method">
|
1368
|
+
|
1369
|
+
#<strong>getPixel</strong>(x, y) ⇒ <tt>Object</tt>
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1373
|
+
|
1374
|
+
|
1375
|
+
</h3><div class="docstring">
|
1376
|
+
<div class="discussion">
|
1377
|
+
|
1378
|
+
<p>Return the color of the pixel at (<em>x</em>, <em>y</em>).</p>
|
1379
|
+
|
1380
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1381
|
+
<dl class="rdoc-list note-list"><dt><code>x</code>
|
1382
|
+
<dd>
|
1383
|
+
<p>x-coordinate of the pixel of interest [Integer]</p>
|
1384
|
+
</dd><dt><code>y</code>
|
1385
|
+
<dd>
|
1386
|
+
<p>y-coordinate of the pixel of interest [Integer]</p>
|
1387
|
+
</dd></dl>
|
1388
|
+
|
1389
|
+
|
1390
|
+
</div>
|
1391
|
+
</div>
|
1392
|
+
<div class="tags">
|
1393
|
+
|
1394
|
+
|
1395
|
+
</div><table class="source_code">
|
1396
|
+
<tr>
|
1397
|
+
<td>
|
1398
|
+
<pre class="lines">
|
1399
|
+
|
1400
|
+
|
1401
|
+
115</pre>
|
1402
|
+
</td>
|
1403
|
+
<td>
|
1404
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 115</span>
|
1405
|
+
|
1406
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_getPixel'>getPixel</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1407
|
+
</td>
|
1408
|
+
</tr>
|
1409
|
+
</table>
|
1410
|
+
</div>
|
1411
|
+
|
1412
|
+
<div class="method_details ">
|
1413
|
+
<h3 class="signature " id="gradient-instance_method">
|
1414
|
+
|
1415
|
+
#<strong>gradient</strong>(topleft, topright, bottomleft, bottomright) ⇒ <tt>Object</tt>
|
1416
|
+
|
1417
|
+
|
1418
|
+
|
1419
|
+
|
1420
|
+
|
1421
|
+
</h3><div class="docstring">
|
1422
|
+
<div class="discussion">
|
1423
|
+
|
1424
|
+
<p>Fill image using a bilinear gradient.</p>
|
1425
|
+
|
1426
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1427
|
+
<dl class="rdoc-list note-list"><dt><code>topleft</code>
|
1428
|
+
<dd>
|
1429
|
+
<p>pixel color for top-left corner <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1430
|
+
</dd><dt><code>topright</code>
|
1431
|
+
<dd>
|
1432
|
+
<p>pixel color for top-right corner <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1433
|
+
</dd><dt><code>bottomleft</code>
|
1434
|
+
<dd>
|
1435
|
+
<p>pixel color for bottom-left corner <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1436
|
+
</dd><dt><code>bottomright</code>
|
1437
|
+
<dd>
|
1438
|
+
<p>pixel color for bottom-right corner <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1439
|
+
</dd></dl>
|
1440
|
+
|
1441
|
+
|
1442
|
+
</div>
|
1443
|
+
</div>
|
1444
|
+
<div class="tags">
|
1445
|
+
|
1446
|
+
|
1447
|
+
</div><table class="source_code">
|
1448
|
+
<tr>
|
1449
|
+
<td>
|
1450
|
+
<pre class="lines">
|
1451
|
+
|
1452
|
+
|
1453
|
+
283</pre>
|
1454
|
+
</td>
|
1455
|
+
<td>
|
1456
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 283</span>
|
1457
|
+
|
1458
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_gradient'>gradient</span><span class='lparen'>(</span><span class='id identifier rubyid_topleft'>topleft</span><span class='comma'>,</span> <span class='id identifier rubyid_topright'>topright</span><span class='comma'>,</span> <span class='id identifier rubyid_bottomleft'>bottomleft</span><span class='comma'>,</span> <span class='id identifier rubyid_bottomright'>bottomright</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1459
|
+
</td>
|
1460
|
+
</tr>
|
1461
|
+
</table>
|
1462
|
+
</div>
|
1463
|
+
|
1464
|
+
<div class="method_details ">
|
1465
|
+
<h3 class="signature " id="hasAlpha?-instance_method">
|
1466
|
+
|
1467
|
+
#<strong>hasAlpha?</strong> ⇒ <tt>Boolean</tt>
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
</h3><div class="docstring">
|
1474
|
+
<div class="discussion">
|
1475
|
+
|
1476
|
+
<p>Scan the image and return <code>false</code> if it's fully opaque.</p>
|
1477
|
+
|
1478
|
+
|
1479
|
+
</div>
|
1480
|
+
</div>
|
1481
|
+
<div class="tags">
|
1482
|
+
|
1483
|
+
<p class="tag_title">Returns:</p>
|
1484
|
+
<ul class="return">
|
1485
|
+
|
1486
|
+
<li>
|
1487
|
+
|
1488
|
+
|
1489
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
</li>
|
1494
|
+
|
1495
|
+
</ul>
|
1496
|
+
|
1497
|
+
</div><table class="source_code">
|
1498
|
+
<tr>
|
1499
|
+
<td>
|
1500
|
+
<pre class="lines">
|
1501
|
+
|
1502
|
+
|
1503
|
+
129</pre>
|
1504
|
+
</td>
|
1505
|
+
<td>
|
1506
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 129</span>
|
1507
|
+
|
1508
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hasAlpha?'>hasAlpha?</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1509
|
+
</td>
|
1510
|
+
</tr>
|
1511
|
+
</table>
|
1512
|
+
</div>
|
1513
|
+
|
1514
|
+
<div class="method_details ">
|
1515
|
+
<h3 class="signature " id="hgradient-instance_method">
|
1516
|
+
|
1517
|
+
#<strong>hgradient</strong>(left, right) ⇒ <tt>Object</tt>
|
1518
|
+
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1522
|
+
|
1523
|
+
</h3><div class="docstring">
|
1524
|
+
<div class="discussion">
|
1525
|
+
|
1526
|
+
<p>Fill image using a horizontal gradient.</p>
|
1527
|
+
|
1528
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1529
|
+
<dl class="rdoc-list note-list"><dt><code>left</code>
|
1530
|
+
<dd>
|
1531
|
+
<p>starting color, for leftmost pixels <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1532
|
+
</dd><dt><code>right</code>
|
1533
|
+
<dd>
|
1534
|
+
<p>ending color, for rightmost pixels <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
1535
|
+
</dd></dl>
|
1536
|
+
|
1537
|
+
|
1538
|
+
</div>
|
1539
|
+
</div>
|
1540
|
+
<div class="tags">
|
1541
|
+
|
1542
|
+
|
1543
|
+
</div><table class="source_code">
|
1544
|
+
<tr>
|
1545
|
+
<td>
|
1546
|
+
<pre class="lines">
|
1547
|
+
|
1548
|
+
|
1549
|
+
261</pre>
|
1550
|
+
</td>
|
1551
|
+
<td>
|
1552
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 261</span>
|
1553
|
+
|
1554
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hgradient'>hgradient</span><span class='lparen'>(</span><span class='id identifier rubyid_left'>left</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1555
|
+
</td>
|
1556
|
+
</tr>
|
1557
|
+
</table>
|
1558
|
+
</div>
|
1559
|
+
|
1560
|
+
<div class="method_details ">
|
1561
|
+
<h3 class="signature " id="initialize_without_data_string-instance_method">
|
1562
|
+
|
1563
|
+
#<strong>initialize_without_data_string</strong> ⇒ <tt><span class='object_link'><a href="" title="Fox::FXImage (class)">FXImage</a></span></tt>
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
|
1568
|
+
|
1569
|
+
</h3><div class="docstring">
|
1570
|
+
<div class="discussion">
|
1571
|
+
|
1572
|
+
<p>Create an image. If a client-side pixel buffer has been specified, the image owns the pixel buffer. If the <code>IMAGE_OWNED</code> flag is set but a <code>nil</code> pixel buffer is passed, a pixel buffer will be automatically created and will be owned by the image. The flags <code>IMAGE_SHMI</code> and <code>IMAGE_SHMP</code> may be specified for large images to instruct <span class='object_link'><a href="#render-instance_method" title="Fox::FXImage#render (method)">#render</a></span> to use shared memory to communicate with the server.</p>
|
1573
|
+
|
1574
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1575
|
+
<dl class="rdoc-list note-list"><dt><code>a</code>
|
1576
|
+
<dd>
|
1577
|
+
<p>an application instance <span class='object_link'><a href="FXApp.html" title="Fox::FXApp (class)">Fox::FXApp</a></span></p>
|
1578
|
+
</dd><dt><code>pixels</code>
|
1579
|
+
<dd>
|
1580
|
+
<p>pixels [Array of FXColor values or string of raw [RGBA] values]</p>
|
1581
|
+
</dd><dt><code>opts</code>
|
1582
|
+
<dd>
|
1583
|
+
<p>image options [Integer]</p>
|
1584
|
+
</dd><dt><code>width</code>
|
1585
|
+
<dd>
|
1586
|
+
<p>image width [Integer]</p>
|
1587
|
+
</dd><dt><code>height</code>
|
1588
|
+
<dd>
|
1589
|
+
<p>image height [Integer]</p>
|
1590
|
+
</dd></dl>
|
1591
|
+
|
1592
|
+
|
1593
|
+
</div>
|
1594
|
+
</div>
|
1595
|
+
<div class="tags">
|
1596
|
+
|
1597
|
+
<p class="tag_title">Returns:</p>
|
1598
|
+
<ul class="return">
|
1599
|
+
|
1600
|
+
<li>
|
1601
|
+
|
1602
|
+
|
1603
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Fox::FXImage (class)">FXImage</a></span></tt>)</span>
|
1604
|
+
|
1605
|
+
|
1606
|
+
|
1607
|
+
—
|
1608
|
+
<div class='inline'>
|
1609
|
+
<p>a new instance of FXImage</p>
|
1610
|
+
</div>
|
1611
|
+
|
1612
|
+
</li>
|
1613
|
+
|
1614
|
+
</ul>
|
1615
|
+
|
1616
|
+
</div><table class="source_code">
|
1617
|
+
<tr>
|
1618
|
+
<td>
|
1619
|
+
<pre class="lines">
|
1620
|
+
|
1621
|
+
|
1622
|
+
693
|
1623
|
+
694</pre>
|
1624
|
+
</td>
|
1625
|
+
<td>
|
1626
|
+
<pre class="code"><span class="info file"># File 'lib/fox16/core.rb', line 693</span>
|
1627
|
+
|
1628
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_pixels'>pixels</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span> <span class='comment'># :yields: theImage
|
1629
|
+
</span><span class='kw'>end</span></pre>
|
1630
|
+
</td>
|
1631
|
+
</tr>
|
1632
|
+
</table>
|
1633
|
+
</div>
|
1634
|
+
|
1635
|
+
<div class="method_details ">
|
1636
|
+
<h3 class="signature " id="loadPixels-instance_method">
|
1637
|
+
|
1638
|
+
#<strong>loadPixels</strong>(store) ⇒ <tt>Object</tt>
|
1639
|
+
|
1640
|
+
|
1641
|
+
|
1642
|
+
|
1643
|
+
|
1644
|
+
</h3><div class="docstring">
|
1645
|
+
<div class="discussion">
|
1646
|
+
|
1647
|
+
<p>Load pixel data from a stream.</p>
|
1648
|
+
|
1649
|
+
<p>Note that the base class version of <span class='object_link'><a href="#loadPixels-instance_method" title="Fox::FXImage#loadPixels (method)">#loadPixels</a></span> expects to read the the pixel data in a neutral format (i.e. without any image format specific information). For example, if you have a 1024x768 image without an alpha channel (and thus only the red, green and blue channels), <span class='object_link'><a href="#loadPixels-instance_method" title="Fox::FXImage#loadPixels (method)">#loadPixels</a></span> will attempt to read a total of 1024*768*3*8 bytes from the stream. The behavior of <span class='object_link'><a href="#loadPixels-instance_method" title="Fox::FXImage#loadPixels (method)">#loadPixels</a></span> is different for subclasses such as FXPNGImage, where <span class='object_link'><a href="#loadPixels-instance_method" title="Fox::FXImage#loadPixels (method)">#loadPixels</a></span> will instead expects to read the image data in a specific image file format (i.e. the PNG file format).</p>
|
1650
|
+
|
1651
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1652
|
+
<dl class="rdoc-list note-list"><dt><code>store</code>
|
1653
|
+
<dd>
|
1654
|
+
<p>opened stream from which to read the pixel data <span class='object_link'><a href="FXStream.html" title="Fox::FXStream (class)">Fox::FXStream</a></span></p>
|
1655
|
+
</dd></dl>
|
1656
|
+
|
1657
|
+
|
1658
|
+
</div>
|
1659
|
+
</div>
|
1660
|
+
<div class="tags">
|
1661
|
+
|
1662
|
+
|
1663
|
+
</div><table class="source_code">
|
1664
|
+
<tr>
|
1665
|
+
<td>
|
1666
|
+
<pre class="lines">
|
1667
|
+
|
1668
|
+
|
1669
|
+
329</pre>
|
1670
|
+
</td>
|
1671
|
+
<td>
|
1672
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 329</span>
|
1673
|
+
|
1674
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_loadPixels'>loadPixels</span><span class='lparen'>(</span><span class='id identifier rubyid_store'>store</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1675
|
+
</td>
|
1676
|
+
</tr>
|
1677
|
+
</table>
|
1678
|
+
</div>
|
1679
|
+
|
1680
|
+
<div class="method_details ">
|
1681
|
+
<h3 class="signature " id="mirror-instance_method">
|
1682
|
+
|
1683
|
+
#<strong>mirror</strong>(horizontal, vertical) ⇒ <tt>Object</tt>
|
1684
|
+
|
1685
|
+
|
1686
|
+
|
1687
|
+
|
1688
|
+
|
1689
|
+
</h3><div class="docstring">
|
1690
|
+
<div class="discussion">
|
1691
|
+
|
1692
|
+
<p>Mirror image horizontally and/or vertically and then re-render the server-side image from the client-side pixel buffer.</p>
|
1693
|
+
|
1694
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1695
|
+
<dl class="rdoc-list note-list"><dt><code>horizontal</code>
|
1696
|
+
<dd>
|
1697
|
+
<p>if <code>true</code>, the image will be flipped from left to right [Boolean]</p>
|
1698
|
+
</dd><dt><code>vertical</code>
|
1699
|
+
<dd>
|
1700
|
+
<p>if <code>true</code>, the image will be flipped from top to bottom [Boolean]</p>
|
1701
|
+
</dd></dl>
|
1702
|
+
|
1703
|
+
|
1704
|
+
</div>
|
1705
|
+
</div>
|
1706
|
+
<div class="tags">
|
1707
|
+
|
1708
|
+
|
1709
|
+
</div><table class="source_code">
|
1710
|
+
<tr>
|
1711
|
+
<td>
|
1712
|
+
<pre class="lines">
|
1713
|
+
|
1714
|
+
|
1715
|
+
183</pre>
|
1716
|
+
</td>
|
1717
|
+
<td>
|
1718
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 183</span>
|
1719
|
+
|
1720
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_mirror'>mirror</span><span class='lparen'>(</span><span class='id identifier rubyid_horizontal'>horizontal</span><span class='comma'>,</span> <span class='id identifier rubyid_vertical'>vertical</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1721
|
+
</td>
|
1722
|
+
</tr>
|
1723
|
+
</table>
|
1724
|
+
</div>
|
1725
|
+
|
1726
|
+
<div class="method_details ">
|
1727
|
+
<h3 class="signature " id="pixel_string-instance_method">
|
1728
|
+
|
1729
|
+
#<strong>pixel_string</strong>(offset = nil, size = nil) ⇒ <tt>Object</tt>
|
1730
|
+
|
1731
|
+
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1735
|
+
</h3><div class="docstring">
|
1736
|
+
<div class="discussion">
|
1737
|
+
|
1738
|
+
<p>Return a String of the raw color representation of all image pixels.</p>
|
1739
|
+
|
1740
|
+
<p>Image pixels are stored bytewise as [RGBA] values.</p>
|
1741
|
+
|
1742
|
+
<p>Optional offset and size can be used to retrieve a part of the image data. Both are counted in bytes.</p>
|
1743
|
+
|
1744
|
+
|
1745
|
+
</div>
|
1746
|
+
</div>
|
1747
|
+
<div class="tags">
|
1748
|
+
|
1749
|
+
|
1750
|
+
</div><table class="source_code">
|
1751
|
+
<tr>
|
1752
|
+
<td>
|
1753
|
+
<pre class="lines">
|
1754
|
+
|
1755
|
+
|
1756
|
+
105</pre>
|
1757
|
+
</td>
|
1758
|
+
<td>
|
1759
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 105</span>
|
1760
|
+
|
1761
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pixel_string'>pixel_string</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_size'>size</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1762
|
+
</td>
|
1763
|
+
</tr>
|
1764
|
+
</table>
|
1765
|
+
</div>
|
1766
|
+
|
1767
|
+
<div class="method_details ">
|
1768
|
+
<h3 class="signature " id="release-instance_method">
|
1769
|
+
|
1770
|
+
#<strong>release</strong> ⇒ <tt>Object</tt>
|
1771
|
+
|
1772
|
+
|
1773
|
+
|
1774
|
+
|
1775
|
+
|
1776
|
+
</h3><div class="docstring">
|
1777
|
+
<div class="discussion">
|
1778
|
+
|
1779
|
+
<p>Release the client-side pixels buffer, free it if it was owned (i.e. if the <code>IMAGE_OWNED</code> option is set).. If it is not owned, the image just forgets about the buffer.</p>
|
1780
|
+
|
1781
|
+
|
1782
|
+
</div>
|
1783
|
+
</div>
|
1784
|
+
<div class="tags">
|
1785
|
+
|
1786
|
+
|
1787
|
+
</div><table class="source_code">
|
1788
|
+
<tr>
|
1789
|
+
<td>
|
1790
|
+
<pre class="lines">
|
1791
|
+
|
1792
|
+
|
1793
|
+
152</pre>
|
1794
|
+
</td>
|
1795
|
+
<td>
|
1796
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 152</span>
|
1797
|
+
|
1798
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_release'>release</span><span class='lparen'>(</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1799
|
+
</td>
|
1800
|
+
</tr>
|
1801
|
+
</table>
|
1802
|
+
</div>
|
1803
|
+
|
1804
|
+
<div class="method_details ">
|
1805
|
+
<h3 class="signature " id="render-instance_method">
|
1806
|
+
|
1807
|
+
#<strong>render</strong> ⇒ <tt>Object</tt>
|
1808
|
+
|
1809
|
+
|
1810
|
+
|
1811
|
+
|
1812
|
+
|
1813
|
+
</h3><div class="docstring">
|
1814
|
+
<div class="discussion">
|
1815
|
+
|
1816
|
+
<p>Render the image from client-side pixel buffer, if there is data and if the image width and height are greater than zero.</p>
|
1817
|
+
|
1818
|
+
|
1819
|
+
</div>
|
1820
|
+
</div>
|
1821
|
+
<div class="tags">
|
1822
|
+
|
1823
|
+
|
1824
|
+
</div><table class="source_code">
|
1825
|
+
<tr>
|
1826
|
+
<td>
|
1827
|
+
<pre class="lines">
|
1828
|
+
|
1829
|
+
|
1830
|
+
145</pre>
|
1831
|
+
</td>
|
1832
|
+
<td>
|
1833
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 145</span>
|
1834
|
+
|
1835
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1836
|
+
</td>
|
1837
|
+
</tr>
|
1838
|
+
</table>
|
1839
|
+
</div>
|
1840
|
+
|
1841
|
+
<div class="method_details ">
|
1842
|
+
<h3 class="signature " id="restore-instance_method">
|
1843
|
+
|
1844
|
+
#<strong>restore</strong> ⇒ <tt>Object</tt>
|
1845
|
+
|
1846
|
+
|
1847
|
+
|
1848
|
+
|
1849
|
+
|
1850
|
+
</h3><div class="docstring">
|
1851
|
+
<div class="discussion">
|
1852
|
+
|
1853
|
+
<p>Restore client-side pixel buffer from image. This operation overwrites any current values for the client-side pixel buffer with values corresponding to the server-side image. If the image data is <code>nil</code> at the time <span class='object_link'><a href="#restore-instance_method" title="Fox::FXImage#restore (method)">#restore</a></span> is called, the image will first allocate an (owned) pixel buffer to use for this operation.</p>
|
1854
|
+
|
1855
|
+
|
1856
|
+
</div>
|
1857
|
+
</div>
|
1858
|
+
<div class="tags">
|
1859
|
+
|
1860
|
+
|
1861
|
+
</div><table class="source_code">
|
1862
|
+
<tr>
|
1863
|
+
<td>
|
1864
|
+
<pre class="lines">
|
1865
|
+
|
1866
|
+
|
1867
|
+
139</pre>
|
1868
|
+
</td>
|
1869
|
+
<td>
|
1870
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 139</span>
|
1871
|
+
|
1872
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_restore'>restore</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1873
|
+
</td>
|
1874
|
+
</tr>
|
1875
|
+
</table>
|
1876
|
+
</div>
|
1877
|
+
|
1878
|
+
<div class="method_details ">
|
1879
|
+
<h3 class="signature " id="rotate-instance_method">
|
1880
|
+
|
1881
|
+
#<strong>rotate</strong>(degrees) ⇒ <tt>Object</tt>
|
1882
|
+
|
1883
|
+
|
1884
|
+
|
1885
|
+
|
1886
|
+
|
1887
|
+
</h3><div class="docstring">
|
1888
|
+
<div class="discussion">
|
1889
|
+
|
1890
|
+
<p>Rotate image counter-clockwise by some number of degrees and then re-render the server-side image from the client-side pixel buffer.</p>
|
1891
|
+
|
1892
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1893
|
+
<dl class="rdoc-list note-list"><dt><code>degrees</code>
|
1894
|
+
<dd>
|
1895
|
+
<p>number of degrees by which to rotate the image [Integer]</p>
|
1896
|
+
</dd></dl>
|
1897
|
+
|
1898
|
+
|
1899
|
+
</div>
|
1900
|
+
</div>
|
1901
|
+
<div class="tags">
|
1902
|
+
|
1903
|
+
|
1904
|
+
</div><table class="source_code">
|
1905
|
+
<tr>
|
1906
|
+
<td>
|
1907
|
+
<pre class="lines">
|
1908
|
+
|
1909
|
+
|
1910
|
+
193</pre>
|
1911
|
+
</td>
|
1912
|
+
<td>
|
1913
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 193</span>
|
1914
|
+
|
1915
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rotate'>rotate</span><span class='lparen'>(</span><span class='id identifier rubyid_degrees'>degrees</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1916
|
+
</td>
|
1917
|
+
</tr>
|
1918
|
+
</table>
|
1919
|
+
</div>
|
1920
|
+
|
1921
|
+
<div class="method_details ">
|
1922
|
+
<h3 class="signature " id="savePixels-instance_method">
|
1923
|
+
|
1924
|
+
#<strong>savePixels</strong>(store) ⇒ <tt>Object</tt>
|
1925
|
+
|
1926
|
+
|
1927
|
+
|
1928
|
+
|
1929
|
+
|
1930
|
+
</h3><div class="docstring">
|
1931
|
+
<div class="discussion">
|
1932
|
+
|
1933
|
+
<p>Save pixel data to a stream.</p>
|
1934
|
+
|
1935
|
+
<p>Note that the base class version of <span class='object_link'><a href="#savePixels-instance_method" title="Fox::FXImage#savePixels (method)">#savePixels</a></span> saves the pixel data as-is, without any image format specific information. For example, if you have a 1024x768 image without an alpha channel (and thus only the red, green and blue channels) the total number of bytes written to the stream will be 1024*768*3*8. The behavior of <span class='object_link'><a href="#savePixels-instance_method" title="Fox::FXImage#savePixels (method)">#savePixels</a></span> is different for subclasses such as FXPNGImage, where <span class='object_link'><a href="#savePixels-instance_method" title="Fox::FXImage#savePixels (method)">#savePixels</a></span> will instead save the image data in a specific image file format (i.e. the PNG file format).</p>
|
1936
|
+
|
1937
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1938
|
+
<dl class="rdoc-list note-list"><dt><code>store</code>
|
1939
|
+
<dd>
|
1940
|
+
<p>opened stream to which to save the pixel data <span class='object_link'><a href="FXStream.html" title="Fox::FXStream (class)">Fox::FXStream</a></span></p>
|
1941
|
+
</dd></dl>
|
1942
|
+
|
1943
|
+
|
1944
|
+
</div>
|
1945
|
+
</div>
|
1946
|
+
<div class="tags">
|
1947
|
+
|
1948
|
+
|
1949
|
+
</div><table class="source_code">
|
1950
|
+
<tr>
|
1951
|
+
<td>
|
1952
|
+
<pre class="lines">
|
1953
|
+
|
1954
|
+
|
1955
|
+
310</pre>
|
1956
|
+
</td>
|
1957
|
+
<td>
|
1958
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 310</span>
|
1959
|
+
|
1960
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_savePixels'>savePixels</span><span class='lparen'>(</span><span class='id identifier rubyid_store'>store</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
1961
|
+
</td>
|
1962
|
+
</tr>
|
1963
|
+
</table>
|
1964
|
+
</div>
|
1965
|
+
|
1966
|
+
<div class="method_details ">
|
1967
|
+
<h3 class="signature " id="scale-instance_method">
|
1968
|
+
|
1969
|
+
#<strong>scale</strong>(w, h, quality = 0) ⇒ <tt>Object</tt>
|
1970
|
+
|
1971
|
+
|
1972
|
+
|
1973
|
+
|
1974
|
+
|
1975
|
+
</h3><div class="docstring">
|
1976
|
+
<div class="discussion">
|
1977
|
+
|
1978
|
+
<p>Rescale pixels image to the specified width and height and then re-render the server-side image from the client-side pixel buffer. Note that this serves a slightly different purpose than the base class resize() method, which simply resizes the client-side pixel data buffer but doesn't transform the image.</p>
|
1979
|
+
|
1980
|
+
<p>The optional third argument specifies the <em>quality</em> of the scaling algorithm used. By default, <span class='object_link'><a href="#scale-instance_method" title="Fox::FXImage#scale (method)">#scale</a></span> uses a fast (but low quality) nearest-neighbor algorithm for scaling the image to its new size. To use the higher-quality scaling algorithm from FOX 1.0, you should pass in a value of 1 as the third argument to <span class='object_link'><a href="#scale-instance_method" title="Fox::FXImage#scale (method)">#scale</a></span>.</p>
|
1981
|
+
|
1982
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
1983
|
+
<dl class="rdoc-list note-list"><dt><code>width</code>
|
1984
|
+
<dd>
|
1985
|
+
<p>new image width, in pixels [Integer]</p>
|
1986
|
+
</dd><dt><code>height</code>
|
1987
|
+
<dd>
|
1988
|
+
<p>new image height, in pixels [Integer]</p>
|
1989
|
+
</dd><dt><code>quality</code>
|
1990
|
+
<dd>
|
1991
|
+
<p>scaling algorithm quality, either 0 or 1 (see above) [Integer]</p>
|
1992
|
+
</dd></dl>
|
1993
|
+
|
1994
|
+
|
1995
|
+
</div>
|
1996
|
+
</div>
|
1997
|
+
<div class="tags">
|
1998
|
+
|
1999
|
+
|
2000
|
+
</div><table class="source_code">
|
2001
|
+
<tr>
|
2002
|
+
<td>
|
2003
|
+
<pre class="lines">
|
2004
|
+
|
2005
|
+
|
2006
|
+
172</pre>
|
2007
|
+
</td>
|
2008
|
+
<td>
|
2009
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 172</span>
|
2010
|
+
|
2011
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_scale'>scale</span><span class='lparen'>(</span><span class='id identifier rubyid_w'>w</span><span class='comma'>,</span> <span class='id identifier rubyid_h'>h</span><span class='comma'>,</span> <span class='id identifier rubyid_quality'>quality</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2012
|
+
</td>
|
2013
|
+
</tr>
|
2014
|
+
</table>
|
2015
|
+
</div>
|
2016
|
+
|
2017
|
+
<div class="method_details ">
|
2018
|
+
<h3 class="signature " id="setPixel-instance_method">
|
2019
|
+
|
2020
|
+
#<strong>setPixel</strong>(x, y, clr) ⇒ <tt>Object</tt>
|
2021
|
+
|
2022
|
+
|
2023
|
+
|
2024
|
+
|
2025
|
+
|
2026
|
+
</h3><div class="docstring">
|
2027
|
+
<div class="discussion">
|
2028
|
+
|
2029
|
+
<p>Set pixel at (<em>x</em>, <em>y</em>) to <em>clr</em>.</p>
|
2030
|
+
|
2031
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2032
|
+
<dl class="rdoc-list note-list"><dt><code>x</code>
|
2033
|
+
<dd>
|
2034
|
+
<p>x-coordinate of the pixel of interest [Integer]</p>
|
2035
|
+
</dd><dt><code>y</code>
|
2036
|
+
<dd>
|
2037
|
+
<p>y-coordinate of the pixel of interest [Integer]</p>
|
2038
|
+
</dd><dt><code>clr</code>
|
2039
|
+
<dd>
|
2040
|
+
<p>new color value for this pixel <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
2041
|
+
</dd></dl>
|
2042
|
+
|
2043
|
+
|
2044
|
+
</div>
|
2045
|
+
</div>
|
2046
|
+
<div class="tags">
|
2047
|
+
|
2048
|
+
|
2049
|
+
</div><table class="source_code">
|
2050
|
+
<tr>
|
2051
|
+
<td>
|
2052
|
+
<pre class="lines">
|
2053
|
+
|
2054
|
+
|
2055
|
+
126</pre>
|
2056
|
+
</td>
|
2057
|
+
<td>
|
2058
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 126</span>
|
2059
|
+
|
2060
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setPixel'>setPixel</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='id identifier rubyid_clr'>clr</span><span class='rparen'>)</span> <span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2061
|
+
</td>
|
2062
|
+
</tr>
|
2063
|
+
</table>
|
2064
|
+
</div>
|
2065
|
+
|
2066
|
+
<div class="method_details ">
|
2067
|
+
<h3 class="signature " id="setPixels-instance_method">
|
2068
|
+
|
2069
|
+
#<strong>setPixels</strong>(pix, *args) ⇒ <tt>Object</tt>
|
2070
|
+
|
2071
|
+
|
2072
|
+
|
2073
|
+
|
2074
|
+
|
2075
|
+
</h3><div class="docstring">
|
2076
|
+
<div class="discussion">
|
2077
|
+
|
2078
|
+
<p>Populate the image with new pixel data of the same size or of a new size</p>
|
2079
|
+
|
2080
|
+
<p>Pixel data is copied and IMAGE_OWNED option is set. If called with <code>width</code> and <code>height</code>, the size of the serverside representation of the image, if it exists, is adjusted but the contents are not updated yet. This can be done by calling render().</p>
|
2081
|
+
|
2082
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2083
|
+
<dl class="rdoc-list note-list"><dt><code>pixels</code>
|
2084
|
+
<dd>
|
2085
|
+
<p>pixels [Array of FXColor values or string of raw [RGBA] values]</p>
|
2086
|
+
</dd><dt><code>opts</code>
|
2087
|
+
<dd>
|
2088
|
+
<p>image options [Integer]</p>
|
2089
|
+
</dd><dt><code>width</code>
|
2090
|
+
<dd>
|
2091
|
+
<p>image width [Integer]</p>
|
2092
|
+
</dd><dt><code>height</code>
|
2093
|
+
<dd>
|
2094
|
+
<p>image height [Integer]</p>
|
2095
|
+
</dd></dl>
|
2096
|
+
|
2097
|
+
|
2098
|
+
</div>
|
2099
|
+
</div>
|
2100
|
+
<div class="tags">
|
2101
|
+
|
2102
|
+
|
2103
|
+
</div><table class="source_code">
|
2104
|
+
<tr>
|
2105
|
+
<td>
|
2106
|
+
<pre class="lines">
|
2107
|
+
|
2108
|
+
|
2109
|
+
95
|
2110
|
+
96</pre>
|
2111
|
+
</td>
|
2112
|
+
<td>
|
2113
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 95</span>
|
2114
|
+
|
2115
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setPixels'>setPixels</span><span class='lparen'>(</span><span class='id identifier rubyid_pixels'>pixels</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
2116
|
+
<span class='kw'>end</span></pre>
|
2117
|
+
</td>
|
2118
|
+
</tr>
|
2119
|
+
</table>
|
2120
|
+
</div>
|
2121
|
+
|
2122
|
+
<div class="method_details ">
|
2123
|
+
<h3 class="signature " id="setPixels_without_data_string-instance_method">
|
2124
|
+
|
2125
|
+
#<strong>setPixels_without_data_string</strong> ⇒ <tt>Object</tt>
|
2126
|
+
|
2127
|
+
|
2128
|
+
|
2129
|
+
|
2130
|
+
|
2131
|
+
</h3><div class="docstring">
|
2132
|
+
<div class="discussion">
|
2133
|
+
|
2134
|
+
<p>Populate the image with new pixel data of the same size or of a new size</p>
|
2135
|
+
|
2136
|
+
<p>Pixel data is copied and IMAGE_OWNED option is set. If called with <code>width</code> and <code>height</code>, the size of the serverside representation of the image, if it exists, is adjusted but the contents are not updated yet. This can be done by calling render().</p>
|
2137
|
+
|
2138
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2139
|
+
<dl class="rdoc-list note-list"><dt><code>pixels</code>
|
2140
|
+
<dd>
|
2141
|
+
<p>pixels [Array of FXColor values or string of raw [RGBA] values]</p>
|
2142
|
+
</dd><dt><code>opts</code>
|
2143
|
+
<dd>
|
2144
|
+
<p>image options [Integer]</p>
|
2145
|
+
</dd><dt><code>width</code>
|
2146
|
+
<dd>
|
2147
|
+
<p>image width [Integer]</p>
|
2148
|
+
</dd><dt><code>height</code>
|
2149
|
+
<dd>
|
2150
|
+
<p>image height [Integer]</p>
|
2151
|
+
</dd></dl>
|
2152
|
+
|
2153
|
+
|
2154
|
+
</div>
|
2155
|
+
</div>
|
2156
|
+
<div class="tags">
|
2157
|
+
|
2158
|
+
|
2159
|
+
</div><table class="source_code">
|
2160
|
+
<tr>
|
2161
|
+
<td>
|
2162
|
+
<pre class="lines">
|
2163
|
+
|
2164
|
+
|
2165
|
+
699
|
2166
|
+
700</pre>
|
2167
|
+
</td>
|
2168
|
+
<td>
|
2169
|
+
<pre class="code"><span class="info file"># File 'lib/fox16/core.rb', line 699</span>
|
2170
|
+
|
2171
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setPixels'>setPixels</span><span class='lparen'>(</span><span class='id identifier rubyid_pixels'>pixels</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_height'>height</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
2172
|
+
<span class='kw'>end</span></pre>
|
2173
|
+
</td>
|
2174
|
+
</tr>
|
2175
|
+
</table>
|
2176
|
+
</div>
|
2177
|
+
|
2178
|
+
<div class="method_details ">
|
2179
|
+
<h3 class="signature " id="vgradient-instance_method">
|
2180
|
+
|
2181
|
+
#<strong>vgradient</strong>(top, bottom) ⇒ <tt>Object</tt>
|
2182
|
+
|
2183
|
+
|
2184
|
+
|
2185
|
+
|
2186
|
+
|
2187
|
+
</h3><div class="docstring">
|
2188
|
+
<div class="discussion">
|
2189
|
+
|
2190
|
+
<p>Fill image using a vertical gradient.</p>
|
2191
|
+
|
2192
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2193
|
+
<dl class="rdoc-list note-list"><dt><code>top</code>
|
2194
|
+
<dd>
|
2195
|
+
<p>starting color, for topmost pixels <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
2196
|
+
</dd><dt><code>bottom</code>
|
2197
|
+
<dd>
|
2198
|
+
<p>ending color, for bottommost pixels <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
2199
|
+
</dd></dl>
|
2200
|
+
|
2201
|
+
|
2202
|
+
</div>
|
2203
|
+
</div>
|
2204
|
+
<div class="tags">
|
2205
|
+
|
2206
|
+
|
2207
|
+
</div><table class="source_code">
|
2208
|
+
<tr>
|
2209
|
+
<td>
|
2210
|
+
<pre class="lines">
|
2211
|
+
|
2212
|
+
|
2213
|
+
271</pre>
|
2214
|
+
</td>
|
2215
|
+
<td>
|
2216
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 271</span>
|
2217
|
+
|
2218
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_vgradient'>vgradient</span><span class='lparen'>(</span><span class='id identifier rubyid_top'>top</span><span class='comma'>,</span> <span class='id identifier rubyid_bottom'>bottom</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2219
|
+
</td>
|
2220
|
+
</tr>
|
2221
|
+
</table>
|
2222
|
+
</div>
|
2223
|
+
|
2224
|
+
<div class="method_details ">
|
2225
|
+
<h3 class="signature " id="xshear-instance_method">
|
2226
|
+
|
2227
|
+
#<strong>xshear</strong>(shear, color = 0) ⇒ <tt>Object</tt>
|
2228
|
+
|
2229
|
+
|
2230
|
+
|
2231
|
+
|
2232
|
+
|
2233
|
+
</h3><div class="docstring">
|
2234
|
+
<div class="discussion">
|
2235
|
+
|
2236
|
+
<p>Shear image horizontally and then re-render the server-side image from the client-side pixel buffer. The number of pixels is equal to the <em>shear</em> parameter times 256. The area outside the image is filled with transparent black, unless another <em>color</em> is specified.</p>
|
2237
|
+
|
2238
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2239
|
+
<dl class="rdoc-list note-list"><dt><code>shear</code>
|
2240
|
+
<dd>
|
2241
|
+
<p>how far to shear [Integer]</p>
|
2242
|
+
</dd><dt><code>color</code>
|
2243
|
+
<dd>
|
2244
|
+
<p>fill color for areas outside the sheared image <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
2245
|
+
</dd></dl>
|
2246
|
+
|
2247
|
+
|
2248
|
+
</div>
|
2249
|
+
</div>
|
2250
|
+
<div class="tags">
|
2251
|
+
|
2252
|
+
|
2253
|
+
</div><table class="source_code">
|
2254
|
+
<tr>
|
2255
|
+
<td>
|
2256
|
+
<pre class="lines">
|
2257
|
+
|
2258
|
+
|
2259
|
+
238</pre>
|
2260
|
+
</td>
|
2261
|
+
<td>
|
2262
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 238</span>
|
2263
|
+
|
2264
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_xshear'>xshear</span><span class='lparen'>(</span><span class='id identifier rubyid_shear'>shear</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2265
|
+
</td>
|
2266
|
+
</tr>
|
2267
|
+
</table>
|
2268
|
+
</div>
|
2269
|
+
|
2270
|
+
<div class="method_details ">
|
2271
|
+
<h3 class="signature " id="yshear-instance_method">
|
2272
|
+
|
2273
|
+
#<strong>yshear</strong>(shear, color = 0) ⇒ <tt>Object</tt>
|
2274
|
+
|
2275
|
+
|
2276
|
+
|
2277
|
+
|
2278
|
+
|
2279
|
+
</h3><div class="docstring">
|
2280
|
+
<div class="discussion">
|
2281
|
+
|
2282
|
+
<p>Shear image verticallyand then re-render the server-side image from the client-side pixel buffer. The number of pixels is equal to the <em>shear</em> parameter times 256. The area outside the image is filled with transparent black, unless another <em>color</em> is specified.</p>
|
2283
|
+
|
2284
|
+
<h4 id="label-Parameters-3A">Parameters:</h4>
|
2285
|
+
<dl class="rdoc-list note-list"><dt><code>shear</code>
|
2286
|
+
<dd>
|
2287
|
+
<p>how far to shear [Integer]</p>
|
2288
|
+
</dd><dt><code>color</code>
|
2289
|
+
<dd>
|
2290
|
+
<p>fill color for areas outside the sheared image <span class='object_link'><a href="FXColor.html" title="Fox::FXColor (class)">Fox::FXColor</a></span></p>
|
2291
|
+
</dd></dl>
|
2292
|
+
|
2293
|
+
|
2294
|
+
</div>
|
2295
|
+
</div>
|
2296
|
+
<div class="tags">
|
2297
|
+
|
2298
|
+
|
2299
|
+
</div><table class="source_code">
|
2300
|
+
<tr>
|
2301
|
+
<td>
|
2302
|
+
<pre class="lines">
|
2303
|
+
|
2304
|
+
|
2305
|
+
251</pre>
|
2306
|
+
</td>
|
2307
|
+
<td>
|
2308
|
+
<pre class="code"><span class="info file"># File 'rdoc-sources/FXImage.rb', line 251</span>
|
2309
|
+
|
2310
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_yshear'>yshear</span><span class='lparen'>(</span><span class='id identifier rubyid_shear'>shear</span><span class='comma'>,</span> <span class='id identifier rubyid_color'>color</span><span class='op'>=</span><span class='int'>0</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
2311
|
+
</td>
|
2312
|
+
</tr>
|
2313
|
+
</table>
|
2314
|
+
</div>
|
2315
|
+
|
2316
|
+
</div>
|
2317
|
+
|
2318
|
+
</div>
|
2319
|
+
|
2320
|
+
<div id="footer">
|
2321
|
+
Generated on Fri Nov 27 21:10:38 2020 by
|
2322
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2323
|
+
0.9.24 (ruby-2.7.2).
|
2324
|
+
</div>
|
2325
|
+
|
2326
|
+
</div>
|
2327
|
+
</body>
|
2328
|
+
</html>
|