|
|
|
|
|
- Properties specific to picRTF variables
picRTF (Type of variable) In french: picRTF
The picRTF type is used to define all the advanced characteristics of a layer that contains RTF. You can define and change the characteristics of this layer in RTF using different WLanguage properties. Caution: This type of variable is only used with picLayer variables. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
sFile is string = fExeDir() + ["\"] + "SourceImg.jpg"
MyWDPic is WDPic = sFile
WatermarkLayer is picLayer
WatermarkLayer.Name = "Watermark"
WatermarkLayer.Width = MyWDPic.Width
WatermarkLayer.Height = MyWDPic.Height
WatermarkLayer.Type = typeLayerRTF
WatermarkLayer.RTF = [
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1036
{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fnil\fcharset0 Calibri;}}
{\colortbl ;\red255\green0\blue0;}
{\*\generator Riched20 10.0.18362}\viewkind4\uc1
\pard\widctlpar\sl276\slmult1\f0\fs24\lang12 My
\cf1 text\cf0 in \b RTF\b0\f1\fs22\par}}
]
ArrayAdd(MyWDPic.Layer, WatermarkLayer)
IE_NoName1 = MyWDPic
Info("To be continued...")
WatermarkLayer<-MyWDPic.Layer["Watermark"]
WatermarkLayer.Text = "My watermark"
IE_NoName1 = MyWDPic
Info("To be continued...")
sNewFile is string = fExeDir() + ["\"] + "DestinationImg.wdpic"
MyWDPic.Save(sNewFile)
MyNewWDPic is WDPic = sNewFile
WatermarkLayer<-MyNewWDPic.Layer["Watermark"]
WatermarkLayer.Text.Font.Angle = 30
WatermarkLayer.Text.Font.Size = 150
WatermarkLayer.Text.Font.Color = iDarkRed
WatermarkLayer.RTF = [
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1036
{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fnil\fcharset0 Calibri;}}
{\colortbl ;\red255\green0\blue0;}
{\*\generator Riched20 10.0.18362}\viewkind4\uc1
\pard\widctlpar\sl276\slmult1\f0\fs24\lang12 My
\cf1 text\cf0 in \b RTF1\b0\f1\fs22\par}}
]
IE_NoName1 = MyNewWDPic
Remarks Properties specific to picRTF variables The following properties can be used to handle an RTF layer: | | | Property name | Type used | Effect |
---|
RTF | Character string | Text with rich text format (with RTF tags). |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|