Product : Engine, Version : 4.0.0.1017, ArticleID : 41017039

HowTo : Print a text "demoversion" on my drawings

Article41017039
TypeHowTo
ProductEngine
Version4.0.0.1017
Date Added3/21/2003
Submitted byNorbert Schulze-Kahleyss
Keywords

Subject

Print a text "demoversion" on my drawings

Summary

I have a question about putting objects in foreground/background. I tried to print a text "demoversion" on my drawings, big letters in grey. But this text is always in foreground, even if I first print the text and then print the drawing over it. The black lines of the drawing are behind the big grey letters. I want to have this like a "watermark". Any possibility?

Solution

Use a code like below:

Private Sub VDPro1_Draw(ByVal Render As VDProLib.vdRender, Cancel As Integer)
Dim xx      As Double
Dim yy      As Double
Dim zz      As Double
Dim Height1 As Double
Dim DMode As Variant
    Render.PushMatrix
    Render.SelectWorldMatrix
    Height1 = (Render.PixelSize * 40)
    Render.GetViewCenter xx, yy, zz
    Render.Select_Pen VdPenSolid, 2, 0
    Render.Drawtext "VectorDraw Eval", xx, yy, zz, VDPro1.ActiveDocument.TextStyles(0), Height1, 3.1415 / 4, VdTextHorCenter, VdTextVerCen
    Render.PopMatrix
End Sub

Private Sub VDPro1_ScrollView(dx As Double, dy As Double, Cancel As Integer)
Dim a As Variant
    a = VDPro1.ActiveDocument.ActiveLayOut.ViewCenter
    a(0) = a(0) - dx
    a(1) = a(1) + dy
    VDPro1.ActiveDocument.ActiveLayOut.ViewCenter = a
    VDPro1.Redraw
    Cancel = 1
End Sub