This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Noufal123  
#1 Posted : Thursday, February 24, 2011 9:14:37 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Hello.. I am using Aurigma graphicmills5.5, I have written the codes in multilayer to fit the multilayerviewer "

MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.BestFit;
MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.FitToWidth;
MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.FitToHeight;
" for Bestfit, fittowidth and fittoheight.. ,when it use the zoom mode with any value,its working correctly,but in the case of Bestfit,Fittowidth and fittoheight, its not have any changes .. how can i fix this? pls help me..

Edited by user Thursday, February 24, 2011 9:15:39 PM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#2 Posted : Thursday, February 24, 2011 9:58:35 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Quote:
I have written the codes in multilayer to fit the multilayerviewer "
MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.BestFit;
MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.FitToWidth;
MultiLayerViewer.ZoomMode = Aurigma.GraphicsMill.WinControls.ZoomMode.FitToHeight;" for Bestfit, fittowidth and fittoheight.. ,when it use the zoom mode with any value,its working correctly,but in the case of Bestfit,Fittowidth and fittoheight, its not have any changes ..

Could you please clarify this question is related to this topic? Please explain how it should work. I tested the sample you attached in your previous post, and it worked okay.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Noufal123  
#3 Posted : Thursday, February 24, 2011 11:30:18 PM(UTC)
Noufal123

Rank: Advanced Member

Groups: Guest
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
I am using the following function to set the zoom of multilayer viewer.. In the combobox,it contains the Bestfit,Fittowidth, FittoHeight, 10,25,50,100..... when it select the integer values 10,20..1600. its working well.. when i select the bestfit or fittowidth or fittoheight option ,its remain the same as the value selected from (10,20....). No change with options Bestfit,Fittowidth,fittoheight.

private void ParseComboBoxZoomText()
{
_isTextChanged = false;
if ((_zoomToolStripComboBox.Text == "Best Fit") || (_zoomToolStripComboBox.Text == "Fit to Width") || (_zoomToolStripComboBox.Text == "Fit to Height"))
{
if (_zoomToolStripComboBox.Text == "Best Fit")
{
_multiLayerViewer.ZoomMode = ZoomMode.BestFit;
}
else if (_zoomToolStripComboBox.Text == "Fit to Width")
{
_multiLayerViewer.ZoomMode = ZoomMode.FitToWidth;
}
else if (_zoomToolStripComboBox.Text == "Fit to Height")
{
_multiLayerViewer.ZoomMode = ZoomMode.FitToHeight;
}
return;
}

float zoom;
string strZoom = _zoomToolStripComboBox.Text.Trim(null);

//Zoom can contain % in the end of text
if (strZoom.Length == 0)
{
return;
}
System.Globalization.NumberFormatInfo numberFormat = new System.Globalization.NumberFormatInfo();
if (strZoom[strZoom.Length - 1] == '%')
{
zoom = Convert.ToSingle(float.Parse(strZoom.Substring(0, strZoom.Length - 1), numberFormat) / 100.0F);
}
else
{
zoom = Convert.ToSingle(float.Parse(strZoom, numberFormat) / 100.0F);
}

if ((zoom < _multiLayerViewer.MinZoom) || (zoom > _multiLayerViewer.MaxZoom))
{
throw (new System.FormatException(""));
}

_multiLayerViewer.ZoomMode = ZoomMode.None;
_multiLayerViewer.Zoom = zoom;
}



I have checked sample code "MultiLayerImageEditorCS_NET20" downloaded from your website, its have the same problem in my system

Edited by user Friday, February 25, 2011 12:48:21 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#4 Posted : Friday, February 25, 2011 1:54:23 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
I checked standard Multilayer Demo Editor with combo-box element of zoom. It works as expected.

I attached screen shots, which illustrate it.
  1. originalWindow.png. Here is zoom of 100% value.
  2. bestFit.png. The view of MLV, after clicking “Best Fit” zoom mode.
  3. fitToHeight.png. I stretched window vertically to test “Fit To Height” mode.
  4. fitToHeight.png. I I stretched window horizontally to test “Fit To Width” mode.

Edited by user Friday, February 25, 2011 1:56:45 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov attached the following image(s):
originalWindow.PNG
bestFit.PNG
fitToHeight.PNG
fitToWidth.PNG
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
thanks 1 user thanked Dmitry.Obukhov for this useful post.
Noufal123 on 2/25/2011(UTC)
mzhao  
#5 Posted : Thursday, April 7, 2011 6:15:28 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Guest
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
How is the actual implementation in terms of scale when Zoom mode is best fit, fit to height, and fit to width.

Eg. when the zoom is 200%, scale is 2.0; when the zoom is 150%, scale is 1.5.

How about best fit, fit to height and fit to width?
Dmitry.Obukhov  
#6 Posted : Monday, April 11, 2011 3:14:52 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Ming,

Please read ZoomMode Enumeration article of GM documentation to find detailed information on zoom modes.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.