From graphics-request at octave dot org Mon Feb 13 03:34:56 2006 Subject: Re: Handle graphics plotting functions From: Ole Jacob Hagen To: Shai Ayal CC: octave-graphics , octave maintainers mailing list Date: Mon, 13 Feb 2006 10:32:06 +0000 Hi. We (me and my brother) have implemented a library called Props. We designed Props by having this requirement: "Octave shouldn't be aware of any visualisation application, or how the visualisation application stored its visualisation data. The reason is that Octave is responsible to solve different problems numerically, and should therefore not be aware of visualisations." I believe that Octave could be used by a GUI application, that works both as a plotting engine and an editor. What if Oplot (w/Props) and Octave GUI joined forces, and create a freely Qt4 application where a user have a command prompt, command history, editing feature, and plotting with handle graphics (with handle graphics object editor) included? Props gives the "handle graphics functionality" in Oplot. An could easily be used by other visualisation application, since it's not dependant on visualisation application. The visualisation application are using Props functionality. Props support the following object and the following properties: Common objects: BusyAction, ButtonDownFcn, Children ,Clipping, CreateFcn, DeleteFcn, ErrorMessage HandleVisibility, Interruptible, Parent, Selected, SelectionHighlight Tag, Type, UserData and Visible Root: CurrentFigure, ErrorMessage, Units, ScreenDepth, ScreenSize, Visible, +common objects. Figure: CurrentAxes, units, nextplot, position, name, color, menubar, name, numbertitle, resize, windowstyle, colormap, dithermap, dithermapmode, fixedcolors, mincolormap, sharecolors, alphamap, backingstore, doublebuffer, renderer, renderermode, visible, pointer, pointershapehotspot, pointershapecdata + common objects. Axes: colororder, position, view, xlim,ylim, zlim, dataaspectratio, plotboxaspectratio, cameratarget, cameraposition, cameraupvector, units, xlimmode, ylimmode, zlimmode, xgrid, ygrid, zgrid, dataaspectratiomode, plotboxaspectratiomode, projection, camerapositionmode, nextplot, visible + common objects. Image: cdata, cdatamapping, xdata, ydata, alphadata, alphadatamapping, + common objects. Line: xdata, ydata, zdata, marker, markersize, linestyle, linewidth, color, erasemode, + common objects. Text: string, fontname, fontsize, rotation, position, color, fontangle, fontunits, fontweight, units, horisontalalignment, verticalalignment, handlevisible, + common objects. Surface: Not used by Oplot yet...+ common objects. Patch: vertices, xdata, ydata, zdata, cdata, edgecolor, linestyle, linewithd, marker, markersize, ambientstrength, backfacelighning, facelightning, diffusestrength, edgeligtning, specularclorrefltance, specularexponent, vertexnormals, normalmode, erasemode, alhpadatamapping, edgeaplha, facealpha, facevertexalphadata, + common objects. uicontrol* uimenu* uicontextmenu* The postfix * indicates that they have not been implemented in Props yet. But they are added easily. Both objects and properties are added easily. Properties can be added like this: addProperty(new MatrixProperty("vertices", 0, 0)) addProperty(new StringProperty("FontName")) addProperty(new DoubleProperty("FontSize")) -------------------------------------------------------------------------------------------------- Props is implemented in C++ using singleton pattern and callbacks, and handles handle graphics data used by visualisation application. Any visualisation application can use Props by inheriting the object-class and configuring the callbackinterface, by setting the callbackinterface. This handle graphics implementation contains copies of data, sent from Octave to a visualisation application. It is possible to include the Qt Octave GUI into Oplot, or vice versa. But Oplot needs to be Qt4-tized first....;-) Best regards, Ole J.