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

change "name" to "id" and upload image

hello

is it possible to change the "name" attribute to an "id" attribute in the "tabs" region and the "layers" region ?
using "name" is not valid XHTML1 ?

is it possible to load an image directly in to the editor region ?
Hi,
is it possible to change the "name" attribute to an "id" attribute in the "tabs" region and the "layers" region ?
using "name" is not valid XHTML1 ?

Our developers will prepare new version for you. It will be available next week.

is it possible to load an image directly in to the editor region ?

Could you please describe this problem a bit detailed.
thanks

about the second question:
instead of using an image from the "Images/Labels" folder, i want the user to be able to add his own image.
the loading of the image to the server is not a problem, just how do i add it directly as the bottom layer of the editor window ?
Hi,

Thanks to explanation.
Yes, it is possible. After your customer added own file, you should save it on your server. Now you can load this file as background in Gift Editor (PhotoLabelSample.aspx.cs Line:185):
photoLabel.BackgroundImage = file;
Where file is the path of uploaded file.
thanks for the quick reply Tamila,

but i was talking about the active region not the entire background.

also how do i set a circular active region instead of a rectangular one ?

thanks again
Hi!

This is example how you can add an image into region:

	protected void addImageBtn_Click(object sender, EventArgs e)
	{
		// Save uploaded file
		string filePath = MapPath("~/Saves/" + FileUpload1.FileName);
		FileUpload1.SaveAs(filePath);

		// Get current selected region
		Layer l = photoLabel.CanvasViewer.Canvas.CurrentLayer;
		RectangleRegion r = l.Region;
		
		// Create ImageVObject
		ImageVObject imgVObject = new ImageVObject(new FileInfo(filePath));
		
		// Resize image to fit into region
		float dx = imgVObject.Width / r.Width;
		float dy = imgVObject.Height / r.Height;
		if (dx < dy)
		{
			imgVObject.Width = imgVObject.Width / dy;
			imgVObject.Height = imgVObject.Height / dy;
		}
		else
		{
			imgVObject.Width = imgVObject.Width / dx;
			imgVObject.Height = imgVObject.Height / dx;
		}

		// Place image into region
		imgVObject.Location = new Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math.PointF(r.Left, r.Top);
		
		// Set supported actions
		imgVObject.SupportedActions = VObjectAction.Drag | VObjectAction.ProportionalResize;
		
		// Add image to canvas
		l.VObjects.Add(imgVObject);
	}


also how do i set a circular active region instead of a rectangular one ?


Unfortunately, only rectangular region supported.
thanks for the quick reply - working perfectly.

about the circle - is it going to be in the next version ?
also I've seen something about an ellipse region or something in the documentation,
and if we're talking about curved lines - is it possible to do curved text ?

thanks
Hi,
is it possible to change the "name" attribute to an "id" attribute in the "tabs" region and the "layers" region ?
using "name" is not valid XHTML1 ?

New version is already available. You can download it here.

about the circle - is it going to be in the next version ?
also I've seen something about an ellipse region or something in the documentation,
and if we're talking about curved lines - is it possible to do curved text ?

Curved text is not supported too. Unfortunately we do not plan to add such functionality in the nearest future.


strange thing:

as I've written above, the code to load an image as a background works great,
just one strange thing happening with it, the background image layer appears only after i add another layer.
how can i tell the layer view to update ?
Yes, it seems that after postback all items in the layers list are disappeared. We will fix it and update the sample on the forum.
hi again

just a quick one

which of the files have been changed for the removal of the "name" attribute to work ?
do i need to replace all the files for this to work or just some of them ?

thanks
Hi,

We recommend you to replace all files.