Re: Commit: AbiMagick graphics class sort-of works

From: Bob Friesenhahn (bfriesen@simple.dallas.tx.us)
Date: Mon Aug 19 2002 - 16:23:06 EDT

  • Next message: F J Franklin: "commit: abi (BOTH): WARNING_CFLAGS for native compilers"

    On Sun, 18 Aug 2002, Dom Lachowicz wrote:

    > I also like this proposed approach (attach meaning to the text
    > operator), but have a further question:
    >
    > What about gathering text metrics? We'll need something to accommodate
    > the following types of usage:

    Good point. The Image class will provide the textEncoding() method to
    specify the default text encoding scheme for annotations.

    The updates should be available for anonymous cvs/ftp tomorrow.

    Please let me know if I did anything wrong since I don't have any
    Unicode to test with.

    We are debating adding internal iconv() support to ImageMagick. Would
    this be of value to API users?

    Bob

    >
    > long int measureStringWidth ( const string & inString, const string &
    > inEncoding)
    > {
    > Magick::TypeMetric local ;
    > mOffscreen.fontTypeMetrics ( inString, inEncoding, &local ) ;
    > return (long int) local.textWidth () ;
    > }
    >
    > I'd also like to thank Bob for all of the help he's been over these
    > last few days.
    >
    > Cheers,
    > Dom
    >
    > On Sunday, August 18, 2002, at 05:05 PM, Bob Friesenhahn wrote:
    >
    > > Andrew,
    > >
    > > Leonard Rosenthol forwarded your message to me regarding Magick++'s
    > > inability to specify that text is formatted as UTF-8.
    > >
    > > I'd like to get this fixed right the first time since I try to avoid
    > > changes to Magick++'s API. It has got to be right the first time
    > > around.
    > >
    > > There are two options that I see for passing the text encoding option:
    > >
    > > o Add a constructor to DrawableText that also specifies the encoding:
    > >
    > > DrawableText ( const double x_, const double y_,
    > > const std::string &text_,
    > > const std::string &encoding_);
    > >
    > > or
    > >
    > > o Create a new drawable object for specifying the text encoding:
    > >
    > > DrawableTextEncoding ( const std::string &encoding_ );
    > >
    > > which is used like
    > >
    > > list.push_back(DrawableTextEncoding("UTF-8"));
    > > list.push_back(DrawableText(200,300,"stuff"));
    > >
    > > I currently have both schemes implemented, but expect to delete one of
    > > them. I favor attaching the encoding to the text since it is possible
    > > that an application uses several encodings and this fully specifies
    > > the meaning of the text. In addition, adding the encoding to the text
    > > allows DrawableText to be used without a list.
    > >
    > > Comments?
    > >
    > > Bob
    > > ======================================
    > > Bob Friesenhahn
    > > bfriesen@simple.dallas.tx.us
    > > http://www.simplesystems.org/users/bfriesen
    > >
    >

    ======================================
    Bob Friesenhahn
    bfriesen@simple.dallas.tx.us
    http://www.simplesystems.org/users/bfriesen



    This archive was generated by hypermail 2.1.4 : Mon Aug 19 2002 - 16:26:40 EDT