On Sat, 2013-08-24 at 03:19 +0200, Willy Raets wrote: > 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? >
Just to clarify, I need the .png in sPicPath = User.Home & "/MyFolder/mypicture.png" do be drawn underneath the Title at section '--Draw project logo -- -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user