I have some Problems, using the Function GoView.GetBitmapFromCollection().
If there is used a Scale which is lesser than 1f (0.8f or 0.5f e.g.) the output File looks grainy/pixelated.
I try to overwrite the Function and scale the Graphics by myself, without success.
Are there any other ways to get a good-looking, scaled Bitmap?
I thought the results were fine. I could not distinguish the image shown in Windows Picture & Fax Viewer from what I saw in the GoView when I set the GoView.DocScale to 0.5f.
The original Size of the Image is 1024 x 797 Pixel. This is the output Size without scaling.
I need a Size of 717 x 558 Pixel. This should be scaling Factor 0.75 (or something like that, same aspect ratio).
Yes, I am looking at the compressed Image an I know the Problems by compressing Text in Bitmaps
So I try to find a way to scale the GoView vector-based and save it as a Bitmap.
Unfortunately the classes for SVG-Output seemed to be nonfunctional on my Win2k-System. The Demo1-Example crashes if I try to save as SVG (it works fine on WinXP).
Is there a way to fix the Problem by using this classes?
although I don't know what the X,Y position should be for your RectangleF bounds -- I assumed 0,0.
For (2), that's odd, since we developed GoSvg on Windows 2000, although I think all of us now are using Windows XP (or Vista occasionally). I'll investigate.
@Bug:
I am using GoDiagramm in Version 2.6.2.
I could not test the Bug on a other System because I am the only Win2k User. Perhaps it is time for an Upgrade.
@Scaling:
I think you get me wrong, perhaps of my poor English.
The scaling works fine and looks perfect on Screen. The output File is exactly the same, which I will get by scaling the GoView on Screen.
But I could not read the Text in the Nodes any more, after scaling.
(Try to zoom out or “zoom to fit” in Demo1 and look at the Text Elements. It is the same effect.)
But actually we do have a bug generating SVG with .NET 2.0. Everything is fine when using .NET 1.1, on both Windows 2000 and Windows XP. We'll investigate and fix this.
But (1) is the Problem.
I need to scale the GoView and save it as a PNG to use it in another Application and finally print it as PDF with a specified display format.
If I do not scale the PNG, it does not fit the page because it is oversized.
But if I try to scale it with GetBitmapFromCollection() it looks pixelated and the Node-Text is not longer readable.
Because of this I try to find another way to reduce the Size of the File.
For a moment, let's just consider what you see in your application. If you change the GoView.DocScale, for example by Control-mouse-wheel, can you get all the objects you care about to fit into the screen area you want? And when you do so, is all of the text legible?
If you can get the GoView to appear the way you want, then GoView.GetBitmapFromCollection, giving it the GoView.DocExtent and GoView.DocScale and a true value to show the paper color, should give you a Bitmap that will appear exactly as you see in your application. (Minus any view objects such as selection handles or background grid.) You can then save the Bitmap as a PNG file or in some other format.
(Question 1): Yes
(Question 2): No, by scaling the View by a Factor <1.0 the text becomes more and more illegible. The view on Screen looks exactly like the bitmap. But the text on both outputs are not longer readable.
Is this something that I could not change or is there a Trick to scale without losing high resolution?
So GetBitmapFromCollection is working correctly. But you don’t like the results when GoView.DocScale is < 1.0 or when the Bitmap is produced with a scale < 1.0.
There's a limit to what can be displayed on a screen, so there isn't anything we can do about that. That's why the user can scroll around as well as change the scale.
But you just mentioned the ability to print, where the printer presumably has higher resolution than a monitor screen. Why can't you generate the PNG file at the normal scale (1.0) and specify a smaller size to display it in your application and in your PDF document? That way all the details are available, but when printed it will print with more details in the same area.
You might need to do that anyway, in case the diagram you want to display is smaller or larger than you had expected.