photoken wrote: ↑Thu 29 Jun 2017 09:35
I found that I had to change the VBS code for setting the paragraph alignment:
Code: Select all
paragraphAttribute.Add "Alignment", 0
to this:
Code: Select all
paragraphAttribute.Add("Alignment", PhotoLine.ParagraphAlignment.PACenter);
In other words, using the ParagraphAlignment index number did not work.
Strange.
photoken wrote: ↑Thu 29 Jun 2017 09:35A couple of questions:
- Is the ability to set the font ("Arial") and the font style ("Bold") coming later?
- What is that PhotoLine.Dictionary object? Is it a kind of general purpose object thing?
A Dictionary is an object to describe data. It contains key-value pairs. The key is always a string (in your example above "Alignment") and the value is dependent on the key and on the data you are describing.
The font is part of the text attributes. Every font is defined by a font dictionary. A font dictionary has usually the following keys:
- "FamilyName": String, for example "Arial"
- "PostScriptName": String, optional if setting a font
- "Size": float, font size
- "Weight": LONG, the weight of the font in the range ]0;1000], 400 is normal/regular, 700 is bold
- "Width": LONG, the width of the font in the range ]0;1000], 500 is medium width, 300 is condensed, 700 is expanded
- "Style": LONG, 1: italic
- "Scale": float, optional horizontal scaling (1: normal width)
Of course, "Size", "Weight", "Width" and "Style" have to be supported by the given font family, otherwise a similar font is used. If you set "PostScriptName", this values will be set implicitly, because a postscript name is sufficient to define a font completely. Only "Size" and "Scale" can be set in this case.
Martin