Ploting Vector Files

BlitzMax Forums/BlitzMax Programming/Ploting Vector Files

Nigel Brown(Posted 2005) [#1]
Anyone who has use for vector files in thier apps could do worse than use this info to support them:

http://www.xara.com/support/docs/webformat/spec/


Yan(Posted 2005) [#2]
Computer Concepts...Blimey, that's a blast from the past.


taxlerendiosk(Posted 2005) [#3]
I'd be interested in this, thanks.


taxlerendiosk(Posted 2005) [#4]
Ok, I've been busy on vector stuff. Not with this, but Cairo. I couldn't manage to get a Blitz program to incorporate the C source, but using a DLL I've got a Cairo context rendering straight onto a pixmap buffer with full alpha, gradients etc. I've made near-complete wrapper types so the Blitz code with the module I'm making looks like this:

canvas:TPixmap = CreatePixmap(256,256,PF_BGRA8888)
surf:TCairoSurface = TCairoImageSurface.CreateForPixmap(canvas)

cairo:TCairo = TCairo.Create(surf)

cairo.SetSourceRGBA(1,0.2,0.2,0.6)
cairo.Arc(xc, yc, 0.05, 0, 2*Pi)
cairo.Fill()
cairo.SetLineWidth(0.03)
cairo.Arc(xc, yc, radius, angle1, angle1)
cairo.LineTo(xc, yc)
cairo.Arc(xc, yc, radius, angle2, angle2)
cairo.LineTo(xc, yc)
cairo.Stroke()


rather than

canvas:TPixmap = CreatePixmap(256,256,PF_BGRA8888)
surf:Byte Ptr = cairo_image_surface_create_for_data( PixmapPixelPtr(canvas), ..
		CAIRO_FORMAT_ARGB32, PixmapWidth(canvas), PixmapHeight(canvas), ..
		PixmapPitch(canvas) )

cairo:Byte Ptr = cairo_create(surf)

cairo_set_source_rgba(cairo, 1,0.2,0.2,0.6)
cairo_arc(cairo, xc, yc, 0.05, 0, 2*Pi)
cairo_fill(cairo)
cairo_set_line_width(cairo, 0.03)
cairo_arc(cairo, xc, yc, radius, angle1, angle1)
cairo_line_to(cairo, xc, yc)
cairo_arc(cairo, xc, yc, radius, angle2, angle2)
cairo_line_to(cairo, xc, yc)
cairo_stroke(cairo)

As yet you can only do stuff manually, I haven't managed to find a way for it to interpret any kind of vector format (there's a libsvg-cairo but I can't work out how to incorporate it).


Haramanai(Posted 2006) [#5]
Looks like we missed a vector craphics module.


gameshastra(Posted 2007) [#6]
hi guys, i have basic doubts in working with vector files.

what are the vector files formats does blitz max support ? or we need to add a opensource dll to read ,save a vector files in blitz. pls help


tonyg(Posted 2007) [#7]
This?


Brucey(Posted 2007) [#8]
It's okay tony. Some people prefer to reinvent the wheel :-)


gameshastra(Posted 2007) [#9]
thank u tonyg


gameshastra(Posted 2007) [#10]
hi
i have one more doubt
can we call dll's files in bmx files , pls let me know how to invoke it .
thanks in advance


Nigel Brown(Posted 2009) [#11]
http://www.xaraxtreme.org/?task=view need mac developers?


Brucey(Posted 2009) [#12]

Es ist tot :-p