[RQt-devel] qdrawText() in Qt 4.7.0

Yihui Xie xieyihui at gmail.com
Wed Oct 20 05:43:55 CEST 2010


After struggling with this problem for another few hours, I finally
figured out the reason:
http://github.com/ggobi/qtpaint/commit/dba9fdefdab125e3013e69f582b3a03825080e5a
There is something wrong in this commit. The texts can be correctly
drawn with earlier qtpaint revisions.

Fortunately it is not a compatibility issue...

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Tue, Oct 19, 2010 at 1:36 PM, Yihui Xie <xieyihui at gmail.com> wrote:
> Here comes a minimal example (with screenshots attached):
>
> library(qtpaint)
> s <- qscene()
> test_layer <- qlayer(s, function(layer, painter) {
>    qlineWidth(painter) = 2
>    qdrawRect(painter, 10, 10, 90, 90, stroke = 'blue')
>    ## origin of y is incorrect (at the top of the canvas; should be
> at the center)
>    for(y in c(-50,-30,0,30,50)) {
>        qdrawText(painter, paste('y =',y), 50,y)
>    }
>    ## but x is correct
>    for(x in c(0,30,50,80,100)) {
>        qdrawText(painter, paste('x =',x), x, -60)
>    }
> }, limits=qrect(0,0,100,100))
> qplotView(s)
>
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
>
>
> On Tue, Oct 19, 2010 at 7:55 AM, Michael Lawrence
> <lawrence.michael at gene.com> wrote:
>> Moved this over to the more appropriate qtinterfaces-devel list. I am
>> installing Qt 4.7 now and will work towards compatibility. For this
>> particular issue, it would be helpful if you could send a simple
>> reproducible example.
>>
>> Thanks,
>> Michael
>>
>> On Mon, Oct 18, 2010 at 8:50 AM, Yihui Xie <xieyihui at gmail.com> wrote:
>>>
>>> Hi (Michael),
>>>
>>> Last Friday I tried Qt 4.7.0 under Ubuntu 10.10 (installed from
>>> Synaptic); everything worked well except the qdrawText() function. See
>>> the attachments: it always draws y=0 at the top most of the canvas
>>> when I draw the y-axis tickmark labels, while there are no problems
>>> with qdrawSegment(). I've spent several hours on this problem but
>>> cannot find out the reason...
>>>
>>> > sessionInfo()
>>> R version 2.12.0 (2010-10-15)
>>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>>
>>> locale:
>>> [1] en_US.utf8
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] RColorBrewer_1.0-2 plumbr_0.0-1       qtpaint_0.7.11
>>>
>>> loaded via a namespace (and not attached):
>>> [1] qtbase_0.8-7
>>>
>>> Regards,
>>> Yihui
>>> --
>>> Yihui Xie <xieyihui at gmail.com>
>>> Phone: 515-294-2465 Web: http://yihui.name
>>> Department of Statistics, Iowa State University
>>> 2215 Snedecor Hall, Ames, IA
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "GGobi core" group.
>>> To post to this group, send email to ggobi-core at googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> ggobi-core+unsubscribe at googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/ggobi-core?hl=en.
>>>
>>
>>
>> _______________________________________________
>> Qtinterfaces-devel mailing list
>> Qtinterfaces-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel
>>
>>
>


More information about the Qtinterfaces-devel mailing list