SaveAsDefaultVector doesn't

Has anyone else had problems with saving vector graphics as .emf files? Code that used to work pre-Xojo doesn’t work anymore and even the VectorGraphics example project only saves low resolution rasters (and bombs when one tries to load the file they created). I know that PICTs have been deprecated in Mac OS X, but my Windows users are complaining that .emf no longer works. For reasons I don’t quite understand, they prefer emf to pdf…

I am using Xojo 2013 v. 3.1.

emf vs pdf

Note that I never saw / create an emf file, but I know what a vector pict was

how do you edit a pdf in your software ?

If I had now, I use The GIMP, but I am not sure it will stay vector at GIMP save time.

[quote=58036:@Richard Allmendinger]Has anyone else had problems with saving vector graphics as .emf files? Code that used to work pre-Xojo doesn’t work anymore and even the VectorGraphics example project only saves low resolution rasters (and bombs when one tries to load the file they created). I know that PICTs have been deprecated in Mac OS X, but my Windows users are complaining that .emf no longer works. For reasons I don’t quite understand, they prefer emf to pdf…

I am using Xojo 2013 v. 3.1.[/quote]
A feedback report & example would be good
I Just opened the Vector graphics example in 2013r4.1, ran it, saved the EMF & can open it in a few MS Apps (Paint & WordPad)
Don’t have a lot of other tools to work with them
Moved the EMF to my mac & opened it there as well

Yes, VectorGraphics saves a file but the file contains a raster image, not vector graphics that can be edited in a program like CorelDraw, Canvas, etc. The code that VectorGraphics uses looks like this:

Dim group As New Group2D
group.Append®
group.Append(s)
mSavePicture = New Picture(Me.Width, Me.Height, 32)
mSavePicture.Graphics.DrawObject(group, 100, 100)
g.DrawPicture(mSavePicture, 0, 0)

where the group contains 2 RoundRectShapes. In the save button:

Dim file As FolderItem
file = GetSaveFolderItem("", “vector”)
If file <> Nil Then
mSavePicture.Save(file, Picture.SaveAsDefaultVector)
End If

This produces a file containing a low resolution (72 dpi) bitmap image of the vector graphics, not editable vectors as previously.

if one changes " mSavePicture.Graphics.DrawObject(group, 100, 100)" to “mSavePicture.Objects = group” (which used to work) the resulting file saved is empty.

I’m happy to submit a feedback report but wanted to make sure I have not missed some deprecated commands, a change in how Xojo operates, or have screwed up my own code somehow (very possible)

Ah right you are about the raster
Missed that in quick look I took at the example

I’m not aware of any recent changes
Which version was your software previously compiled in ?
I’d still submit a feedback report as well

Thanks for confirming.

This seemed to occur on the switch from RealBasic to Xojo, though I’m not 100% sure as all my own work is in MacOS X and I simple compile for Windows with only cursory testing (these are free scientific programs for academic users so the scientific routines are tested much more rigorously than the interface routines…)

Feedback 31616 - Picture.SaveAsDefaultVector saves only low resolution raster image