How can I programmatically change an image-with-string patch text justification ? It seems the setting is only available in Quartz Composer but cannot be used as an input-port

Yeah, this is only available in the inspector panel.

I can manually justify the text for a one-line string by computing the correct coordinates, but for multiple-lines strings, programmatically accessing this setting would be really helpful.

Not really. However, when the input space is small (as is the case with text justification), brute force + multiplexers can help solve this:

Attachment: TextAlignment.qtz
Description: application/quartzcomposer



This will pass the input string to 4 string renderers, one of each flavor. A multiplexer is used to choose the correct one. Multiplexers intelligently only execute the input they're using, not all of them, so it shouldn't have a huge impact on performance.

Anybody has a workaround ?


Hopefully the above is functional for you. If you need vertical alignment as well, you can extend the same idea (though it requires 16 patches, instead of just 4). It starts to get a bit ridiculous- looking at that point :)

Perhaps I start continue the petition to have inspector panels only used for patch-altering controls (i.e. number of input/output ports, etc), instead of things that really should be input controls... not sure if I brought up that idea on the list before. *shrugs*

--
[ christopher wright ]
[email protected]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to