Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
hi my name's maurizio I am new in this forum and i not speak very good english...
I have Try in Vb.Net Graphics Mill for .Net and i not understend is i load image PNG in multilayer... i have see example multilayerviews but i not undertend for easy click botton
if i am file in c:\example001.png in botton1_clik
MultiLayerViewer1.Layers.Add(c:\"example001-png") but not work...
where I wrong? some of you could write me an example?
Thank you Maurizio
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hello Maurizio, You can add image into MultiLayerViewer using the following code: Code:Aurigma.GraphicsMill.Bitmap bmp = new Aurigma.GraphicsMill.Bitmap(@"c:\example001.png");
Aurigma.GraphicsMill.WinControls.ImageVObject imgVObj = new Aurigma.GraphicsMill.WinControls.ImageVObject(bmp, false, 0, 0);
_multiLayerViewer.CurrentLayer.VObjects.Add(imgVObj);
|
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
hi Tamila Thank you for your reply...
i have try but not work :( i have copy and paste your code in Button1_click...
if i add one or more image is possible clear only image select with mouse?
Thank you Maurizio
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, Quote:i have try but not work :( i have copy and paste your code in Button1_click... What is wrong? Any error messages? Quote:if i add one or more image is possible clear only image select with mouse? Could you please describe it a bit detailed. |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
hi Tamila
Error Aurigma.GraphicsMill.Bitmap bmp error @ error Aurigma.GraphicsMill.WinControls.ImageVObject imgVObj error imgVObj imgVObj i think it's not undeclared...
sorry for my bad english and tank you for your reply..
Maurizio
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi Maurizio, As I understand from you other posts you use VB.NET. In this case the code I posted before (for C#) should look like this: Code:Dim bmp As New Aurigma.GraphicsMill.Bitmap("c:/example001.png")
Dim imgVObj As New Aurigma.GraphicsMill.WinControls.ImageVObject(bmp, False, 0, 0)
MultiLayerViewer1.CurrentLayer.VObjects.Add(imgVObj)
|
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
Ok Tamila work! :)
If i use Multilayerviewer1.workspaceWith = ("640") Multilayerviewer1.workspaceHeight = ("480")
for setting DPI ??
PS Where is command for enable and disable resize proportional mode in VB.NET?
Thank you Tamila for your reply and sorry for my bad english
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
You can set DPI when you render the workspace: Code:Multilayerviewer1.RenderWorkspace(300) ' It means - 300 DPI
I recommend you to investigate our Multilayer Image Editor sample. This sample demonstrates how to work with MultiLayerViewer and Vector Objects. |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
hi Tamila i have see Multilayer image editor sample...
I have see function ShiftSelectedObjectUp and ShiftSelectedObjectDown
example Private Sub ShiftSelectedObjectsUp() If _objectsListBox.SelectedIndices.Count > 0 Then Dim array(_objectsListBox.SelectedIndices.Count - 1) As Integer _objectsListBox.SelectedIndices.CopyTo(array, 0) ShiftObjectsUp(array) SetCurrentObjects(array) End If End Sub
if i not have _objectsListBox ?
Thank you for reply Maurizio
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
hi tamila i have try in this mode:
Dim Layer0001 as aurigma.GraphicsMill.WinControlls.layer = New Aurigma.GraphicsMill.WinControls.layer("ImageBack") Dim Layer0002 as aurigma.GraphicsMill.WinControlls.layer = New Aurigma.GraphicsMill.WinControls.layer("ImageABC")
MultiLayerView1.layer.add(imageback) MultiLayerView1.layer.add(imageABC)
i select layer imageback with MultiLayerView1.CurrentLayer = imageback
I open image in layer imageback with MultiLayerView1.CurrentLayer.VObjects.add(imgVObj)
and block this layer with MultiLayerView1.CurrentLayer.Locked =true
after i select other layer MultiLayerView1.CurrentLayer = imageABC
........
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi,
Could you please post the full code of this functionality here.
|
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
Hi Tamila I try this method for create a Layer0 lock and layer1 no lock
Dim bmp As New Aurigma.GraphicsMill.Bitmap(Application.StartupPath & "\WorkMask\" & codgad.Text & ".png") Dim imgVObj As New Aurigma.GraphicsMill.WinControls.ImageVObject(bmp, False, 0, 0) Form1.MultiLayerViewer1.WorkspaceWidth = ("35") '_newDesigner.WidthValue Form1.MultiLayerViewer1.WorkspaceHeight = ("31") '_newDesigner.HeightValue Form1.MultiLayerViewer1.Layers.Add(LayerNew) Form1.MultiLayerViewer1.Layers.Add(WorkArea) Form1.MultiLayerViewer1.CurrentLayer = WorkArea Form1.MultiLayerViewer1.CurrentLayer.VObjects.Add(imgVObj) Form1.MultiLayerViewer1.CurrentLayer.Locked = True Form1.MultiLayerViewer1.CurrentLayer = LayerNew
.... Thank you
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
hi, I recommend you to use Insert() method instead of Add(). In this case you can set the index of added layer: Code:Dim layer1 As New Aurigma.GraphicsMill.WinControls.Layer("First")
Dim layer2 As New Aurigma.GraphicsMill.WinControls.Layer("Second")
MultiLayerViewer1.Layers.Insert(1, layer2)
MultiLayerViewer1.CurrentLayer = layer2
Dim rect As New Aurigma.GraphicsMill.WinControls.RectangleVObject(50, 50, 150, 100)
rect.Brush = Brushes.Azure
MultiLayerViewer1.CurrentLayer.VObjects.Add(rect)
MultiLayerViewer1.CurrentLayer.Locked = True
MultiLayerViewer1.Layers.Insert(0, layer1)
MultiLayerViewer1.CurrentLayer = layer1
Dim ellipse As New Aurigma.GraphicsMill.WinControls.EllipseVObject(10, 10, 200, 100)
MultiLayerViewer1.CurrentLayer.VObjects.Add(ellipse)
I hope it helps you. |
|
|
|
|
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.