Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
text.c
Log Message:
Move some code.
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- text.c 14 May 2006 16:01:17 -0000 1.70
+++ text.c 14 May 2006 19:33:42 -0000 1.71
@@ -29,10 +29,71 @@
#define ExTextExtents XmbTextExtents
#define ExDrawString XmbDrawString
-static void TextDrawRotTo(Win win, Drawable src, Drawable dst,
- int x, int y, int w, int h, TextState * ts);
-static void TextDrawRotBack(Win win, Drawable dst, Drawable src,
- int x, int y, int w, int h, TextState * ts);
+static void
+TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
+ int w, int h, TextState * ts)
+{
+ EImage *im;
+ int win_w;
+
+ switch (ts->style.orientation)
+ {
+ case FONT_TO_UP:
+ im = EImageGrabDrawable(src, 0, y, x, h, w, 0);
+ EImageOrientate(im, 1);
+ EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
+ EImageFree(im);
+ break;
+ case FONT_TO_DOWN:
+ EXGetGeometry(src, NULL, NULL, NULL, &win_w, NULL, NULL, NULL);
+ im = EImageGrabDrawable(src, None, win_w - y - h, x, h, w, 0);
+ EImageOrientate(im, 3);
+ EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
+ EImageFree(im);
+ break;
+ case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe
.... */
+ im = EImageGrabDrawable(src, None, x, y, w, h, 0);
+ EImageOrientate(im, 2);
+ EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
+ EImageFree(im);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
+ int w, int h, TextState * ts)
+{
+ EImage *im;
+ int win_w;
+
+ switch (ts->style.orientation)
+ {
+ case FONT_TO_UP:
+ im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
+ EImageOrientate(im, 3);
+ EImageRenderOnDrawable(im, win, dst, y, x, h, w, 0);
+ EImageFree(im);
+ break;
+ case FONT_TO_DOWN:
+ EXGetGeometry(dst, NULL, NULL, NULL, &win_w, NULL, NULL, NULL);
+ im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
+ EImageOrientate(im, 1);
+ EImageRenderOnDrawable(im, win, dst, win_w - y - h, x, h, w, 0);
+ EImageFree(im);
+ break;
+ case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe
.... */
+ im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
+ EImageOrientate(im, 2);
+ EImageRenderOnDrawable(im, win, dst, x, y, w, h, 0);
+ EImageFree(im);
+ break;
+ default:
+ break;
+ }
+}
TextState *
TextclassGetTextState(TextClass * tclass, int state, int active, int sticky)
@@ -776,70 +837,4 @@
return;
TextstateDrawText(ts, win, draw, text, x, y, w, h, fsize, justification);
-}
-
-static void
-TextDrawRotTo(Win win, Drawable src, Drawable dst, int x, int y,
- int w, int h, TextState * ts)
-{
- EImage *im;
- int win_w;
-
- switch (ts->style.orientation)
- {
- case FONT_TO_UP:
- im = EImageGrabDrawable(src, 0, y, x, h, w, 0);
- EImageOrientate(im, 1);
- EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
- EImageFree(im);
- break;
- case FONT_TO_DOWN:
- EXGetGeometry(src, NULL, NULL, NULL, &win_w, NULL, NULL, NULL);
- im = EImageGrabDrawable(src, None, win_w - y - h, x, h, w, 0);
- EImageOrientate(im, 3);
- EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
- EImageFree(im);
- break;
- case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe
.... */
- im = EImageGrabDrawable(src, None, x, y, w, h, 0);
- EImageOrientate(im, 2);
- EImageRenderOnDrawable(im, win, dst, 0, 0, w, h, 0);
- EImageFree(im);
- break;
- default:
- break;
- }
-}
-
-static void
-TextDrawRotBack(Win win, Drawable dst, Drawable src, int x, int y,
- int w, int h, TextState * ts)
-{
- EImage *im;
- int win_w;
-
- switch (ts->style.orientation)
- {
- case FONT_TO_UP:
- im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
- EImageOrientate(im, 3);
- EImageRenderOnDrawable(im, win, dst, y, x, h, w, 0);
- EImageFree(im);
- break;
- case FONT_TO_DOWN:
- EXGetGeometry(dst, NULL, NULL, NULL, &win_w, NULL, NULL, NULL);
- im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
- EImageOrientate(im, 1);
- EImageRenderOnDrawable(im, win, dst, win_w - y - h, x, h, w, 0);
- EImageFree(im);
- break;
- case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe
.... */
- im = EImageGrabDrawable(src, None, 0, 0, w, h, 0);
- EImageOrientate(im, 2);
- EImageRenderOnDrawable(im, win, dst, x, y, w, h, 0);
- EImageFree(im);
- break;
- default:
- break;
- }
}
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs