From sfischme at uwaterloo.ca  Sun Jan 25 05:05:50 2009
From: sfischme at uwaterloo.ca (Sebastian Fischmeister)
Date: Sat, 24 Jan 2009 23:05:50 -0500
Subject: [Rd] Automatic shortening of text to fit into area
Message-ID: <05F24935-EBEE-432C-83C9-E2BF2717878E@uwaterloo.ca>

Hello,

   A comment in engine.c states: "/* don't draw anything; this could  
be made less crude :) */". The following patch makes it less crude: If  
the device doesn't support clipping and the text doesn't fit into the  
area, then remove one character after another from the text until  
either the text fits or the string is empty.

I attached the patch?it's not indented correctly to keep the patch  
size small?and a test script, so you can give it a try. I don't know  
the R core very well, so this change may need some discussion. Yet it  
works for my figures.

Have fun,
   Sebastian

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-auto-reduction.txt
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090124/a71fd017/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nonclip-str-reduction.txt
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090124/a71fd017/attachment-0001.txt>


[Rd] Automatic shortening of text to fit into area
Sebastian Fischmeister