Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Public Sub _new()
- End
- Public Sub Form_Open()
- PictureBox1.Picture = Picture.Load(Application.path & "/ejemplo.svg")
- LabelSalida.text = User.home & "/ejemploRelleno.svg"
- End
- Public Sub ButtonRellenar_Click()
- dibujar()
- End
- Public Sub dibujar()
- Dim hSvgImage As SvgImage
- Try Kill User.home & "/ejemploRelleno.svg"
- hSvgImage = SvgImage.Load(Application.path & "/ejemplo.svg")
- Paint.Begin(hSvgImage)
- Paint.DrawRichText("<h1> <font color=\"red\"> " & TextBoxTitulo.text & "</font></h1>", 150, 50, 200, 200)
- Paint.DrawRichText("<h2><u>" & TextBoxSubtitulo.text & "</u></h2>", 150, 130, 200, 200)
- Paint.LineWidth = 1
- Paint.Rectangle(290, 140, 50, 50)
- Paint.FillRect(310, 150, 25, 25, Color.Orange)
- Paint.moveto(290, 140)
- Paint.LineTo(310, 150)
- Paint.MoveTo(290, 190)
- Paint.LineTo(310, 175)
- Paint.Stroke()
- Paint.End
- hSvgImage.Save(User.home & "/ejemploRelleno.svg")
- Wait 0.1
- PictureBox1.Picture = Picture.Load(User.home & "/ejemploRelleno.svg")
- End
- Public Sub ButtonLimpiar_Click()
- 'cargo el archivo plantilla sin modificacion
- PictureBox1.Picture = Picture.Load(Application.path & "/ejemplo.svg")
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement