Displaying 2 results from an estimated 2 matches for "blockheight".
2012 Apr 06
1
[WIP PATCH] dri/nouveau: Add S3TC support for nv20.
...src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -207,4 +207,23 @@ get_texgen_coeff(struct gl_texgen *c)
return NULL;
}
+static inline unsigned
+nouveau_format_get_nblocksx(gl_format format,
+ unsigned x)
+{
+ GLuint blockwidth;
+ GLuint blockheight;
+ _mesa_get_format_block_size(format, &blockwidth, &blockheight);
+ return (x + blockwidth - 1) / blockwidth;
+}
+
+static inline unsigned
+nouveau_format_get_nblocksy(gl_format format,
+ unsigned y)
+{
+ GLuint blockwidth;
+ GLuint blockheight;
+ _mesa_get_format_block_size(format...
2010 May 05
0
R-help Digest, Vol 87, Issue 5
...t.ps",width=8.5,height=11)
# set the margins to zero or something narrow
par(mar=c(0,0,0,0))
plot(0,xlab="",ylab="",xlim=c(0,1),ylim=c(0,1),type="n",axes=FALSE)
Then work out whether your block of text will fit into the plot:
blockwidth<-strwidth(mytextblock)
blockheight<-strheight(mytextblock)
# this should get the reduction (or expansion) to make it fit
cexmult<-1/max(c(blockwidth,blockheight)
text(0.5,0.5,mytextblock,cex=cexmult)
This is off the top of my head (which is a bit dented at the moment) so
you might want to try it out first.
Jim
---------...