<br><br><div class="gmail_quote">On Tue, Mar 23, 2010 at 7:26 AM, hadley wickham <span dir="ltr"><<a href="mailto:h.wickham@gmail.com">h.wickham@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> Ok, I understand the benefits for documentation and consistency.<br>
><br>
> I propose these functions:<br>
><br>
> qaddItem: layer$addLayer<br>
> qdeviceTransform: layer$deviceTransform(event)<br>
> q(row,col)Stretch[<-]: layer$layout()$(row,col)[Set]Stretch()<br>
> q(h,v)Spacing<-: layer$layout()$setHorizontal(Vertical)Spacing()<br>
> qbackgroundBrush<-: scene$backgroundBrush <- brush<br>
> qgraphicsScene: Qt$QGraphicsScene()<br>
> qclearSelection: layer$clearSelection()<br>
> qzValue<-: layer$setZValue()<br>
> qprimitives: layer$primitives()<br>
> qminimumSize<-: layer$setMinimumSize()<br>
> qcacheMode<-: layer$setCacheMode()<br>
> qclip<-: layer$setClip()<br>
> qfocus<-: layer$setFocus()<br>
> qlimits<-: layer$setLimits<br>
> qoverlayScene: layer$overlayScene()<br>
><br>
> Think of anything else?<br>
<br>
</div>Looks good. I assume you'll have getters for all the setters? (e.g.<br>
qlimts: layer$getLimits)<br>
<br>
In my mind the next most important thing would be a bit of documentation about:<br>
<br>
* units (data vs. pixel etc)<br>
* the main classes: layer vs. scene<br>
* how layer layouts work<br>
* events<br>
<br>
These are all things that I've asked you about in the past, but I keep<br>
forgetting how they work. If you could jot the essentials down<br>
somewhere, I'd be happy to add to them.<br>
<br></blockquote><div><br>I can get started on this. Pretty busy though this week and next.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
It would also be nice to have a convenience method that would create a<br>
static image:<br>
<br>
static_image(function(p) {<br>
qdrawPoint(0.1, 0.2, colour = "red")<br>
}<br>
<br>
This would initialise the scene and a layer, open the window and draw.<br>
If !interactive() it would immediately close. This would be useful<br>
for examples and tests.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>That could be useful. I had in mind a 'snapshot' function for a QGraphicsScene that would render() the scene to a QPainter (either created by the user or created based on a filename). This way we would create the Layers and Scene just as the user would, except we would render it off-screen rather than display it through a PlotView.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div class="h5">
Hadley<br>
<br>
--<br>
Assistant Professor / Dobelman Family Junior Chair<br>
Department of Statistics / Rice University<br>
<a href="http://had.co.nz/" target="_blank">http://had.co.nz/</a><br>
</div></div></blockquote></div><br>