[Gambas-user] How to insert a .png file into a CairoPdfSurface (gb.cairo)
Willy Raets
willy at ...2734...
Sat Aug 24 03:19:04 CEST 2013
Hi All,
Been struggling with inserting an existing .png file onto a
CairoPdfSurface (gb.cairo).
Done some extensive reading in the documentation but do not seem to find
a method get the job done. Is this not possible or am I misunderstanding
the documentation?
Piece of the code of the project:
Public Sub MakePdf()
Dim hPdfProjectFile As CairoPdfSurface
Dim sPdfPath, sPicPath As String
Dim iX, iY As Float
sPicPath = User.Home & "/MyFolder/mypicture.png"
sPdfPath = User.Home & "/MyFolder/project.pdf"
hPdfProjectFile = New CairoPdfSurface(sPdfPath, 210, 297)
Cairo.Begin(hPdfProjectFile)
'--Draw title --
iY = 250
'-- Some code to determine X coördinate iX --
...
...
Cairo.Font.Bold = True
Cairo.Font.Size = 18
Cairo.MoveTo(iX, iY)
Cairo.DrawText(Start.ProjectLoadedTitle)
Cairo.Font.Bold = False
'
'--Draw project logo --
iY = 285
... '<== stuck right here!!
'
'--Draw Document Version--
iY = 500
...
...
Cairo.End
End
Anyone any ideas, suggestions, links?
--
Kind regards,
Willy (aka gbWilly)
http://gambasshowcase.org/
http://howtogambas.org
http://gambos.org
More information about the User
mailing list