We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

A couple of questions

Thread ID:

Created:

Updated:

Platform:

Replies:

22117 Dec 3,2004 03:50 AM Dec 21,2004 06:29 AM Windows Forms 9
loading
Tags: Diagram
Tommy Norman
Asked On December 3, 2004 03:50 AM

Hello, I''m developing a Display Editor and are now evaluating the possibilities to use the essential diagram. The main issue is that I need to provide a symbol library and have tried to create symbols via the symbol designer but the quality of the grapics I have managed to create with the default setting in the designer diagram are just not good enough, the edges looks bad, especially if i use circles or rounded corners or if I create lines which doesn''t go strictly on either the X or the Y axes. Do you have any ideas/recommendations what I need to do to create shapes who look more less perfect. Another approach I have tried is to import symbol bitmaps to the "LargeIcon" property. Then the symbols looks much better, however when I zoom in on such a symbol(28x28 px) it gets fussy quickly, how can I avoid this? I also have problems that it disappears when I rotate such a symbol via the rotate tool. My diagram is set for pixels how can I set the ruler to show pixels as well? Best Regards Tommy

Administrator [Syncfusion]
Replied On December 3, 2004 09:42 AM

Hi Tommy, Thank you for your interest in Essential Diagram. Wwith reference to your questions: 1. You can change the various properties of the Model and the Symbol instead of using the defaults to do what you are seeking. Here is a screenshot of Symbols being used in the QuickStart sample. As you can see the Symbols look sharp and have shadows. This is becuse the in the RenderingStyle the SmoothingMode mode is set to HighQuality. Here are some more properties of the Symbol you can adjust: FillStyle: LinearGradient instead of Solid and set the GradientStartColor and Color properties. LineStyle: LineWidth: 1 Note that when you use the saved palettes in a Diagram application (like say the QuickStart sample), you can set the various properties of the Model via the PropertyEditor. You can play around with the settings and properties to design Symbols as per your requirements. 2. With reference to problems you encounter when you rotate Symbols, can you post steps to reproduce this in say the DiagramBuilder sample that ships with Essential Diagram. 3. With reference to your question on Ruler Units, currently it only handles real world units and it figures out where to draw the hash marks based on the screen resolution. It would require being able to set an abstract unit of measure which is currently not supported. Again to show pixels, we would have to determine where to draw the hash marks - every 10 pixels? every 20 pixels? What are the subunits? You could draw hash marks at an interval of 1 pixel but that would be a solid rectangle. These are some of the issues that need to be taken into account when we try to implement this feature. I have followed up with the Diagram team and they have asked me to log this as a feature request. Kindly update this posting if you have any further questions. Regards Arun

Administrator [Syncfusion]
Replied On December 3, 2004 09:56 AM

Hi Tommy With reference to the screenshots of Symbols, run the Sample Browser from the start menu to look at the screen-shots of the various samples like the QuickStart sample, the DiagramBuilder sample etc. Thank you for your continued interest in Essential Diagram. Regards Arun

Tommy Norman
Replied On December 7, 2004 07:12 AM

Hi Arun, About my second question I think I need to clearify it a bit. I create a new symbol via the designer tool, then I import a predefined bitmap image(28x28px) via the "Insert Image" tool. This adds obviously a BitmapNode object to the symbol. The symbol looks nice with magnification 100% but gets fuzzy when I start to zoom into such symbol. I have played with the RenderingStyles "HighQuality" & "AntiAlias" but it doesn''t seem to make any difference on such symbol. The rotate problem only occures within my diagram. If I rotate it in the designer it works fine, most of the symbols disappeares when orientation = 90,180 and 270 and displays again in orientation 0 but some of them works in all orientations this is abit strange because the symbols are created in the same way from 28x28px images. I''ll send you the images and the SymbolPalettes and maybe you can find out what it the problem. General info. My diagram works with a grid set on 28x28px size so each symbol exactly maps to the grid and the display size is palmtop 320x240px. I have now tried to create similar symbols as my bitmaps by using the drawing tools in the designer but have not yet managed to get any good result on that, of cource the prefered solution for me would be manage to draw symbols which looks exactly the same as my bitmaps so I don''t have to import them as BitmapNodes into the designer. Symbols created via the drawing tools in the designer doesnt have this problem with rotation and fuzzy look when zooming, here this tricks with the renderingstyle "HighQuality" & "AntiAlias" really makes a difference. Best Regards Tommy SymbolPalettes_830.zip Symbols_7609.zip

Tommy Norman
Replied On December 7, 2004 07:22 AM

I forgot to tell you that I have created a Custom Symbol class so if you want to play with my SymbolPalettes you have to change the subclassing properties back to the syncfusion diagram assembly. Regards Tommy

Administrator [Syncfusion]
Replied On December 7, 2004 11:17 AM

Hi Tommy Yes, you are correct. You should be creating Symbols as demonstrated in the various palettes shipped with Essential Diagram (..syncfusion\essential suite\3.0.0.19\Windows\Diagram.Windows\Symbol Palettes folder). Adding them as bitmaps in not going to give you the flexibility you are seeing. Take a look at the DiagramBuilder sample that uses Symbols from these palettes and how you can control various properties. Regards Arun

Tommy Norman
Replied On December 9, 2004 07:11 AM

Hi again, I have tried your recommendation to create symbols in the designer but the problem is that I need pixel accuracy and this is very difficult to archive in the designer. I have improved the designer my self to be able to magnify the diagram down to pixel level but it''s still a bit unconvinient to work with it especially when you have no support for rulers with pixel support. So my approach now is to use a predefined bitmap which I read in pixel by pixel and then my intention is to draw my customized symbol based on the color of the read pixels. I have already tried a dirty solution to create a rectangle object 1x1 pixel per read pixel and set the fill color to the same as the pixel color. This works but it must be a better way of doing it. Is there any possiblity with syncfusion to set pixels? Best Regards Tommy

Tommy Norman
Replied On December 16, 2004 12:30 AM

Hi Arun, Previously in this thread we discussed the possibility to have the ruler showing pixels. You stated that this has been reported as future extension, when would that be available? However, if I want to implement this my self which methods should I override in the diagram model. I would really appreciate some code samples on how this could be done. Thanks in advance Best Regards Tommy

Prakash S [Syncfusion]
Replied On December 20, 2004 02:52 PM

Hi Tommy, Regarding implementing custom rulers, Essential Diagram uses two classes - Syncfusion.Windows.Forms.Diagram.HorizontalRuler and VerticalRuler, that derive from the base Syncfusion.Windows.Forms.Diagram.Ruler class for implementing the standard horizontal and vertical rulers. The Syncfusion.Windows.Forms.Diagram.View class that implements the diagram control''s ''View'' component hosts the two rulers and uses them for rendering the ruler gradations while drawing the diagram document. To customize the Diagram rulers, you will have to subclass one of the default Ruler classes or the base Ruler type, and implement the requisite drawing algorithm from an override of the Ruler.Draw(Graphics) method that is summoned by the View for drawing the ruler. Once the custom ruler implementation is complete, the next step is to instruct your Diagram control instance to use this Ruler type. This is done by subclassing the Syncfusion.Windows.Forms.Diagram.View class used by the Diagram control, and overriding the View''s CreateHorizontalRuler()/CreateVerticalRuler() methods and returning instances of your custom Ruler types. The final step is to instruct your Diagram control instance to use your subclassed View type. This is done by overriding the Syncfusion.Windows.Forms.Diagram.Controls.Diagram control''s Diagram.CreateView() method and returning the View subclass that uses your custom Rulers. I have attached the ''Ruler.cs'' file that is a part of the Essential Diagram source version and includes the definitions for the Ruler, HorizontalRuler and VerticalRuler classes. Referring to the implementation for one of the standard rulers should give you an idea about how to go about creating your custom Ruler. Please let me know if you have any trouble going about this implementation. I am looking into the issue of creating Symbols based on pixel data, and will update this post as soon as possible. Thanks, Prakash

Administrator [Syncfusion]
Replied On December 21, 2004 06:29 AM

Hi Tommy, We are currently experiencing some problems when trying to upload files to the forum. If you do not have access to the source version of Essential Diagram and would like to take a look at ''Ruler.cs'' file that I mentioned earlier, please send an email to ''prakashs@syncfusion.com'' referring to this forum post. Thanks, Prakash Surendra Syncfusion, Inc

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;