Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
johntee  
#1 Posted : Monday, September 17, 2007 12:24:08 AM(UTC)
johntee

Rank: Member

Groups: Member
Joined: 9/17/2007(UTC)
Posts: 3

I'm currently doing an image editor, i'm basing it from MultiLayer Image Editor, but I need to draw continously, and without having to pick the same tool (designer) after each draw. Because the behavior in MultiLayer Image Editor is when I clicked Add New Line, after adding a line, it goes back to Default (or selector), what I want is after adding a line, Line will still be my current tool.

Thanks a Lot!

Alex Kon  
#2 Posted : Monday, September 17, 2007 3:41:59 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

I have send you a reply via email.

johntee  
#3 Posted : Monday, September 17, 2007 5:05:21 PM(UTC)
johntee

Rank: Member

Groups: Member
Joined: 9/17/2007(UTC)
Posts: 3

thanks Alex, but I haven't received your email.
Alex Kon  
#4 Posted : Wednesday, September 19, 2007 12:10:26 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Hm... something is wrong ;) OK, here is my letter:

There are two ways to implement the task. The first one is to inherit all required designers and redefine their behaviour. The second way - implement switch-back logic in your application. I think that it is preferred way for your case. Here is small code sample which illustrates the idea:

Code:
public class Form1 : System.Windows.Forms.Form
{
	#region "VS automatically generated code"
	// ... Skipped ...	
	#endregion

	private Aurigma.GraphicsMill.WinControls.MultiLayerViewer _mlv;
	private bool _acceptDesignerChange;

	private void Form1_Load(object sender, System.EventArgs e)
	{
		_mlv = new Aurigma.GraphicsMill.WinControls.MultiLayerViewer();
		_placeholderPanel.Controls.Add(_mlv);
		_mlv.Dock = DockStyle.Fill;

		_mlv.DesignerChanged += new Aurigma.GraphicsMill.WinControls.DesignerChangedEventHandler(_mlv_DesignerChanged);
	}

	private void _mlv_DesignerChanged(object sender, Aurigma.GraphicsMill.WinControls.DesignerChangedEventArgs e)
	{
		if (!_acceptDesignerChange)
		{
			_acceptDesignerChange = true;
			_mlv.CurrentDesigner = e.OldDesigner;
		}
		else
		{
			_acceptDesignerChange = false;
		}
	}

	//Line
	private void button1_Click(object sender, System.EventArgs e)
	{
		_acceptDesignerChange = true;
		_mlv.CurrentDesigner = new Aurigma.GraphicsMill.WinControls.LineVObjectCreateDesigner();
	}

	//Ellipse
	private void button2_Click(object sender, System.EventArgs e)
	{
		_acceptDesignerChange = true;
		_mlv.CurrentDesigner = new Aurigma.GraphicsMill.WinControls.EllipseVObjectCreateDesigner();
	}

	//Rectangle
	private void button3_Click(object sender, System.EventArgs e)
	{
		_acceptDesignerChange = true;
		_mlv.CurrentDesigner = new Aurigma.GraphicsMill.WinControls.RectangleVObjectCreateDesigner();
	}
}
If this way is not acceptable for you do not hesitate to contact me. VObjects is a new module in the Graphics Mill for .NET product so any feedback is greatly appreciated.

Edited by user Monday, December 17, 2007 12:34:04 PM(UTC)  | Reason: Not specified

johntee  
#5 Posted : Monday, September 24, 2007 8:36:17 AM(UTC)
johntee

Rank: Member

Groups: Member
Joined: 9/17/2007(UTC)
Posts: 3

thanks Alex, this works for line, rectangle, etc. but I'm using FreehandVObject, which does continues to draw even if i released my mouse left button.

And also for TextVObject, can the end user edit the text directly inside the rubberband? and how do i prevent the Text from resizing if the end user resize the rubberband?

Thanks again, I am currently evaluating this component if this suits our application, before we do the purchase.

Alex Kon  
#6 Posted : Tuesday, September 25, 2007 1:08:16 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Yes, you are right - freehand object should be processed separately. I think that you can additionally check type of the object in the DesignerChanged event handler and allow changing of the designer for freehand.

As for text: no, unfortunately there is no possibilty to edit text in-place now. However, if it is really necessary for you, I can consult you how to implement this functionality, but it is not quite simple task. If you don't want text to be resized you can either turn off resizing at all, or turn on text area resizing. In such case the font itself will not be changed, just area filled with the text (you can see this behaviour in MultiLayerImageEditor sample). Here is small code snippet which shows how to turn on text area resize instead of usual resize:

Code:
obj.SupportedActions[Aurigma.GraphicsMill.WinControls.VObjectAction.ChangeTextArea].Enabled = true;
obj.SupportedActions[Aurigma.GraphicsMill.WinControls.VObjectAction.Resize].Enabled = false;

Edited by user Monday, December 17, 2007 12:34:35 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Similar Topics
DescriptionEditor.MaxTextLength in image editor (Discussions – ActiveX/Java Uploader)
by patter 6/28/2012 9:41:05 AM(UTC)
Image editor - Fotoflexer intergration... (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by benjime 9/6/2011 8:58:09 AM(UTC)
Show image editor automatically (Discussions – ActiveX/Java Uploader)
by Obster 4/19/2011 3:23:03 AM(UTC)
Object position in Multilayer Image editor (Discussions – Graphics Mill)
by Noufal123 9/20/2010 4:36:00 PM(UTC)
online image editor and uploader in flash (Discussions – ActiveX/Java Uploader)
by san1975 8/5/2008 11:58:43 PM(UTC)
SMPL: Multilayer Image Editor Demo (Archive - Graphics Mill)
by Alex Kon 4/18/2008 1:17:08 PM(UTC)
Image Editor Demo (Archive - Graphics Mill)
by jerryj 9/1/2004 12:19:00 AM(UTC)
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.