Search found 6 matches

by Costyv95
2016-03-25T06:52:42-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Re: Draw Text to fit a size

The code i wrote earlier works fine. It didn't work at me because I wasn't using the last version of Magick++ , but libmagick++-dev . After I downloaded the last version of ImageMagick from git and compile it, both img.fillColor(Color("red")) and img.textGravity(CenterGravity); worked. The last code ...
by Costyv95
2016-03-25T05:03:19-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Re: Draw Text to fit a size

Looking at Magick++\options.h, method "void fillColor(const Color &fillColor_)" looks likely. Options.h is a internal class which i cannot use in my code. For the moment I have this code: Image img; img.fillColor("red"); // this has no effect for the label, only for drawable objects that i draw ...
by Costyv95
2016-03-24T08:53:45-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Re: Draw Text to fit a size

Thank You, I'll try to translate that to magick++ .
by Costyv95
2016-03-24T08:18:31-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Re: Draw Text to fit a size

I don't know the Magick++ API. At the MagickCore level, it can be done like this: image_info=CloneImageInfo((ImageInfo *) NULL); image_info->size = ConstantString ("300x500"); (void) strcpy(image_info->filename,"label:Hello); images=ReadImage(image_info,exception); Thank You, I've reached the label ...
by Costyv95
2016-03-24T08:16:48-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Re: Draw Text to fit a size

Thank You, I've reached the label solution, but I have another question. How can I change the color of the label text? fillColor for that image didn't work for me..
by Costyv95
2016-03-24T06:16:26-07:00
Forum: Users
Topic: Draw Text to fit a size
Replies: 9
Views: 3185

Draw Text to fit a size

Hello. I need to draw a text and make it fit a certain size(300x500). I searched on google and found only terminal commands to do it , but no answer regarding magick++ . I use drawableText, but i don't know what drawable to use in order to force the text to fit a certain rectangle.


Thanks.