<image> tag must be defined under a <gendoc> tag.
It shall define one of the following attributes:
An empty drawing area inside start and end of tag:
<image … >
</image>
<image> tag provides the following attributes to handle image size customization: keepW, keepH, maxW, maxH. They are used in association with the dimensions of the drawing area inside <image> tag:
Possible values for these attributes: false(default), true.
For the following initial image:
Template content |
Output |
<image object='…' ![]() </image> |
![]() |
Template content |
Output |
<image object='…' ![]() </image> |
![]() |
Template content |
Output |
<image object='…' ![]() </image> |
![]() |
Template content |
Output |
<image object='…' maxW=‘true’> ![]() </image> |
![]() |
Template content |
Output |
<image object=‘…’ maxW=‘true’ > ![]() </image> |
![]() |
Template content |
Output |
<image object=‘…’ maxH=‘true’ > ![]() </image> |
![]() |
Template content |
Output |
<image object=‘…’ maxH=‘true’ > ![]() </image> |
![]() |
Attribute object shall be filled by an ID of the diagram. Diagram ID can be generated by service getDiagram from bundle gmf, called on the diagram:
<context model='${model}' importedBundles='gmf;papyrus'/>
<gendoc>
[for (diag : Diagram| self.getPapyrusDiagrams()]
<image object='[diag.getDiagram()/]' maxW='true' keepH='false'>
</image>
[/for]
</gendoc>
<image> tag can also be used for static image generation, with the following content:
The following example shows the display of a static image:
Template content |
Generation output |
<context model='${model_path}'/> Project logo is displayed below : <image filePath='D:/gendoc_logo.jpg' maxW='true'> |
Project logo is displayed below : |