Page 1 of 1

Detect text or pixel outside ?

Posted: 2010-11-14T21:02:56-07:00
by Daniel_in_the_sky
Hi everybody,

Im actually working on a script generating randoms designs, including text...

I would like to "detect" when the text is going outside the "picture"/"working area".

there is a comand for that ?

Thank you
D.

Re: Detect text or pixel outside ?

Posted: 2010-11-14T22:41:41-07:00
by anthony
Not easilly. Simplest would be to use a larger image than look for some change outside the areas concerned.

Re: Detect text or pixel outside ?

Posted: 2010-11-15T05:06:48-07:00
by Daniel_in_the_sky
Thank you for your anser.
I see...
"the artistic force" of this idea is the randomless of evrything, the picture keep the same size.
I have to find a way to detect pixels outside, (of the text) and then bring it back inside the area.....
the text is random has well of course ^_^

Maybe... by knowing the width of the text. and adding the X position xtext + xpicture ? if > total width of the picture ?

So there is a command to know the width of the text ? haha i think this direction is worst

D.

Re: Detect text or pixel outside ?

Posted: 2010-11-15T05:24:45-07:00
by GreenKoopa
You could generate a label: of a specified -size, or create a label: and then -crop it. Do you know how you would handle too much text if you could detect it overflowing? Yes, you can determine the width of the new label: canvas.