Re: gnomecanvas rotate text and print?



From: "Michael Sterrett -Mr. Bones.-" <msterret coat com>
To: David L <idht4n hotmail com>
Subject: Re: gnomecanvas rotate text and print?
Date: Sun, 27 Aug 2006 18:03:24 -0400 (EDT)

Isn't that what pango's for?

Could be... there's a nice example of using Pango with Cairo
that shows text at arbitrary angles at:
http://developer.gnome.org/doc/API/2.0/pango/pango-Cairo-Rendering.html

But I don't really see how it relates to gnomecanvas text items.
Half a day of google and gnome documentation searches hasn't
really been too fruitful.  I found basically the same question that
I'm asking from 4 years ago, but there was only one answer saying
something about GnomeCanvasHacktext, but I don't find any
documentation on that.

Basically, I'm looking for the line or lines of code that will follow this
command to rotate the canvas text:

textp = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(parent->gc.gobj())),
                                 gnome_canvas_text_get_type(),
                                  "fill_color", "black",
                                 "x", txtx,
                                 "y", txty,
                                 "text", length,
                                 "anchor",GTK_ANCHOR_W,
"font", "-*-verdana-medium-r-*-*-10-*-*-*-*-*-iso8859-1",
                                 NULL);
// how do I write a function that will rotate textp?

Or do I need to add text that I want at an arbitrary angle using a
different mechanism? (eg pango_add_rotated_text_to_gnomecanvas("foo", 30.0))
If so, can somebody point me to a simple example that uses pango or whatever
to add rotatable text to a gnomecanvas??

Thanks!

                         David




Michael Sterrett
  -Mr. Bones.-
michael sterrett coat com


On Sun, 27 Aug 2006, David L wrote:


Hi David,

Maybe you should use the gd library or imagemagick. As I remember, both
have antialiasing functions.

gnomecanvas has anti-aliasing... I just can't figure out how to
print or rotate text.  I know apps like gnumeric use gnomecanvas
and seem to print nice anti-aliased looking plots,
so I assume there's a way to print the canvas... am I wrong?

I'm a little concerned about text rotation... I've done google searches
that seem to imply that gnomecanvas can't rotate text, but that seems
odd.  I've found some documentation on affine transformations, but
when I try to rotate text with it, it seems to just translate it.

Thanks!

              David


I've started a simple little gtk / gnomecanvas floor plan
drawing application.  I need to figure out how to
rotate gnome canvas text at an arbitrary angle (to put
dimensions on the floor plan).  Also, I want to be able
to print an anti-aliased gnomecanvas with high
resolution to give to an architect.  (I've been just taking
screenshots of the canvas which is cumbersome and
doesn't look very good).  How can I do these things?

Thanks!

                 David

_________________________________________________________________
Get the new Windows Live Messenger!
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

_______________________________________________
gnome-list mailing list
gnome-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-list


_________________________________________________________________
Get real-time traffic reports with Windows Live Local Search
http://local.live.com/default.aspx?v=2&cp=42.336065~-109.392273&style=r&lvl=4&scene=3712634&trfc=1

_______________________________________________
gnome-list mailing list
gnome-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-list



_________________________________________________________________
Got something to buy, sell or swap? Try Windows Live Expo ttp://clk.atdmt.com/MSN/go/msnnkwex0010000001msn/direct/01/?href=http://expo.live.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]