Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Zoom feature (Read 10677 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Zoom feature
Jul 29th, 2014 at 8:15am
Print Post  
There is a way to zoom without mantain aspect ratio of zoom.
I mean if posible enter different value of zoom, for X and for Y zoom.
I really need that feature, sound strange but i need that please.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #1 - Jul 29th, 2014 at 10:54am
Print Post  
We don't plan adding built-in support for non-uniform scaling as it looks ugly, distorting fonts, handles, rounded corners, etc. You could resize the nodes and links instead as in this post:
http://mindfusion.eu/Forum/YaBB.pl?num=1379581836/1#1

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #2 - Jul 29th, 2014 at 10:58am
Print Post  
Ok, that is really bad news, under some specific scenario is ok.
Please really appreciate if can take in consideration this.

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #3 - Jul 29th, 2014 at 11:27am
Print Post  
Actually that's supported out of the box by WPF via the RenderTransform property:
Code
Select All
diagram.RenderTransform = new ScaleTransform(0.5, 2); 



Hit-testing seems to works fine too.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #4 - Aug 1st, 2014 at 1:21pm
Print Post  
Stoyo, please will be possibel consider add this as feature, also if have to pay.
The zoom is really great, and the wpf way not feet with what I need due generate other troubles with other part of the software.

Please can consider this feature?
Also if have to pay for add this. Please
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #5 - Aug 1st, 2014 at 1:25pm
Print Post  
Quote:
The zoom is really great, and the wpf way not feet with what I need


I'm not sure what exactly you are saying. If we implement it through built-in properties, it won't look different from the ScaleTransform above.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #6 - Aug 1st, 2014 at 5:28pm
Print Post  
Please can implement this?
Please!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #7 - Aug 4th, 2014 at 10:41am
Print Post  
We don't plan to. You can implement it perfectly fine yourself in a custom class, e.g. this way if you want to specify zoom levels as percents again:

Code
Select All
public class MyDiagram : Diagram
{
	private double scaleX = 1, scaleY = 1;

	public double ZoomX
	{
		get { return scaleX * 100; }
		set
		{
			scaleX = value / 100;
			UpdateTransform();
		}
	}

	public double ZoomY
	{
		get { return scaleY * 100; }
		set
		{
			scaleY = value / 100;
			UpdateTransform();
		}
	}

	void UpdateTransform()
	{
		RenderTransform = new ScaleTransform(scaleX, scaleY);
	}

	public new double ScrollX
	{
		get { return base.ScrollX / scaleX; }
		set { base.ScrollX = value * scaleX; }
	}

	public new double ScrollY
	{
		get { return base.ScrollY / scaleY; }
		set { base.ScrollY = value * scaleY; }
	}
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #8 - Aug 12th, 2014 at 2:18pm
Print Post  
There is something diffrent.

Please correct to me if I wrong

form.RenderTransform = new ScaleTransform(0.8, 0.8);

is = to

form.zoomfactor = 80;

Correct?

For some reason I ignore, zoomfactor work ok, but rendertransform no.
I working on a dpi aware wpf App, and part of screen is not showed wehn use scale transform but work ok using zoomfactor.
Sorry for insist but this feature is really usefull specially for open diagram in full screen created in other resolutions and different aspect ratio.
If resolution are near, not look so bad if aspect ratio is diffrent or specially if is the same.
Of course very diffrent resolution yes, but need be very very diffrent reso for make look bad.
No idea why mindfusion zoomfactor work and scale transform no.

Near resolution not look so bad, and are usable no matter aspect ratio if different
« Last Edit: Aug 12th, 2014 at 3:37pm by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #9 - Aug 12th, 2014 at 4:05pm
Print Post  
I cannot see any difference between setting ZoomFactor and a uniform ScaleTransform, please attach a test project showing the problem. Check if you are not using the ZoomFactor value in some calculations in your application; you should replace it with the scale from the transform if you start zooming through a ScaleTransform.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #10 - Aug 12th, 2014 at 4:35pm
Print Post  
I not use zoom in anyplace due need zoom x and y for zoom based on aspect ratio.

Using render transform part of form is not visible, portion of screen is not rendered, with zoom that not happen.
I use the same zoom factor for test for rendertransform and for build in zoomfactior feature of the component.
The problem is related to DPI scale, zoom feature in widnows, not is a problem in the code.
For some reason zoomfactor work ok when Windows is scaled.

I have to build a new Project for attach and sent, is very complex to do a lot of code.

There is no way please talk with Slavcho and see if can implement this?
Also if that have a charge?
Can pay for this?
« Last Edit: Aug 12th, 2014 at 5:45pm by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #11 - Aug 12th, 2014 at 6:14pm
Print Post  
If you have the diagram inside some WPF panel that auto-sizes according to its content, try setting LayoutTransform instead of RenderTransform. The latter only scales visually and does not report the scaled size to WPF's layout system, so the panel might not resize as with ZoomFactor and clip the diagram instead.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #12 - Aug 13th, 2014 at 3:47am
Print Post  
My form (diagram) is inside of a different panels and yes resize to size of screen working in full screen mode:

Viewbox - grid - scrollviewer - form

I test for days all what i cna test also LayoutTransform, nothing work, only zoom feature of your component, why? no idea!
Please I know this is a feature will be used for low number of users now, but this change soon specially with incoming ultra high density pixel new screen computers coming to the market.
Zoom feature is great way combined with Windows DPI SCALE, to open diagrams in full screen created form different resolutions, ad with zoom andling X Y, also form different aspect ratios.



I know is not common what I request and be used for low number of users, but please Stoyo, talk with your team.
No idea what zoom do internally but just work in perfect way!
« Last Edit: Aug 13th, 2014 at 5:40am by PDM. »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Zoom feature
Reply #13 - Aug 13th, 2014 at 1:34pm
Print Post  
Here's a test project with viewbox > grid > scrollviewer > diagram layout and buttons to change ZoomFactor and LayoutTransform. We can't see any difference between built-in zoom and scale transform, please let me know what we should change to see the problem:
https://mindfusion.eu/_samples/ZoomAndScale.zip
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Zoom feature
Reply #14 - Aug 13th, 2014 at 4:49pm
Print Post  
Please try this.

The panels and how form is located is exact way ho is on my App.
Like you can see under some situations rendertransform not work in same way as the mindfusion zoom.
I can confirm that, but the zoom feature work perfect on every situation in easy clean way, Transform not.
Please implement the feature I request in zoom : )
« Last Edit: Aug 14th, 2014 at 3:56am by PDM. »  

newtest.zip (Attachment deleted)
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint