title: convert textGrob to imageGrob/rasterGrob?
body: <p>Apologies if this is very straightforward. Actually I hope it will be!</p>
  
  <p>I am trying to dynamically create images from text which I can then resize and plot (either stretched or squashed) to produce a motif-type graph.</p>
  
  <p>I started out using images (which I'd generated using <code>png()</code> and <code>ggplot()</code>) and plotting them as <code>annotation_custom()</code></p>
  
  <pre><code>require(ggplot2)
  require(grid)
  require(gridExtra)
  qplot(c(0,10),c(0,10)) + 
  annotation_custom(rasterGrob(image=readPNG("1999.png"),x=0,y=0,height=1,width=1,just=c("left","bottom")),
                xmin=0,xmax=5,ymin=0,ymax=7.5)
  </code></pre>
  
  <p>to produce:</p>
  
  <p><img src="https://i.stack.imgur.com/0evaJ.png" alt="enter image description here"></p>
  
  <p>This is fine, but it's awkward to create the images dynamically if they are not the same size, using <code>png()</code>, plus it's clunky to persist them to file, so I tried to see if I could use a textGrob:</p>
  
  <pre><code>myText&lt;-"1000"
  myTextGrob&lt;-textGrob(myText,just=c("left","bottom"),gp=gpar(fontsize="100",col="red",fontfamily="Showcard Gothic"))
  qplot(c(0,10),c(0,10))+annotation_custom(myTextGrob,0,0,0,0)
  </code></pre>
  
  <p>and got this, which is fine, except....</p>
  
  <p><img src="https://i.stack.imgur.com/C1D9a.png" alt="textGrob"></p>
  
  <p>...it doesn't seem possible to stretch &amp; skew it in the same way as a <code>rasterGrob</code> so my question is - is it possible to create the textGrob and coerce it to a rasterGrob? Or is there another solution which will let me skew/stretch the textGrob?</p>
  
  <p>Thanks in advance!</p>