Page 1 of 1
Vector graphics
Posted: Thu May 31, 2012 1:09 am
by bjornidar
Hi,
I'm drawing some graphics with InkScape, and I'm able to paste the XAML-code into iX.
But I'm having trouble with handling the object afterwords.
Here's the code for my simple test-object:
Code: Select all
<Viewbox Stretch="Uniform" Name="Viewbox1" Panel.ZIndex="1">
<Canvas Name="svg2" Width="260" Height="150">
<Canvas Name="layer1">
<Canvas.RenderTransform>
<TranslateTransform X="0" Y="-902.36215" />
</Canvas.RenderTransform>
<Path Stroke="#FF000000" StrokeThickness="1" StrokeStartLineCap="Flat" StrokeEndLineCap="Flat" StrokeLineJoin="Miter" Name="path2993">
<Path.Data>
<PathGeometry FillRule="Nonzero" Figures="M6.9790989,963.83529L28.016107,1051.3492 234.72784,1011.8518 257.59417,968.48205 242.95972,911.94652 2.4058306,959.96299z" />
</Path.Data>
</Path>
</Canvas>
</Canvas>
</Viewbox>
I would very much like to fill my object, move mye object without having to plot the coordinates manually, etc...
Can anybody help me?
Re: Vector graphics
Posted: Thu May 31, 2012 7:28 am
by mark.monroe
Hi bjornidar,
A few things:
1) If you grab and rotate the image, for whatever reason, iX Developer will update the Xaml and allow you to move/resize/etc in the Layout editor.
2) iX Developer's Layout editor does not support all the options that you may want to do to an Xaml object. That means that for some things you will need to edit the Xaml yourself. For example, your object has two places that you may want a fill color, the background of the Canvas and the interior of the Path. However, iX Developer's Layout editor only has one place to enter a fill color. For the path object I created the Layout fill option changes the Canvas background fill, not the Path interior Fill.
3) Check out the MSDN on the
Path Xaml.
Here is the Xaml for the screen that I got using your example. Notice how I deleted the <Viewbox> markup tags.
Code: Select all
<?neo version='2.0.356.0'?>
<natss:NeoElementCanvas Name="m_EditorCanvas" Width="800" Height="600" FocusVisualStyle="{x:Null}" AllowDrop="True" ClipToBounds="True" Focusable="True" TextOptions.TextFormattingMode="Ideal" TextOptions.TextRenderingMode="Auto" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:natss="clr-namespace:Neo.ApplicationFramework.Tools.Screen.ScreenEditor;assembly=ToolsIde">
<Canvas Background="#FF275C8B" Name="svg2" Width="266" Height="161" Panel.ZIndex="1" Canvas.Left="299" Canvas.Top="147">
<Canvas.RenderTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<ScaleTransform ScaleX="1" ScaleY="1" />
<RotateTransform Angle="0" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Canvas.RenderTransform>
<Canvas Name="layer1">
<Canvas.RenderTransform>
<TranslateTransform X="0" Y="-902.36215" />
</Canvas.RenderTransform>
<Path Fill="#FF808080" Stroke="#FF000000" StrokeThickness="1" StrokeStartLineCap="Flat" StrokeEndLineCap="Flat" StrokeLineJoin="Miter" Name="path2993">
<Path.Data>
<PathGeometry FillRule="Nonzero" Figures="M6.9790989,963.83529L28.016107,1051.3492 234.72784,1011.8518 257.59417,968.48205 242.95972,911.94652 2.4058306,959.96299z" />
</Path.Data>
</Path>
</Canvas>
</Canvas>
</natss:NeoElementCanvas>
Re: Vector graphics
Posted: Thu May 31, 2012 11:32 pm
by bjornidar
Thank you very much, works fine!
But is it possible to connect the Path.Fill to Dynamic control? So that it changes color while a tag changes value.
Re: Vector graphics
Posted: Fri Jun 01, 2012 7:10 am
by mark.monroe
Hi bjornidar,
iX Developer doesn't understand how to add dynamics to your particular object. Like I mentioned before, it doesn't know which fill to add dynamics too. You would have to code the xaml yourself. Currently we do not have a xaml help document that details what all the markup tags mean.
Re: Vector graphics
Posted: Fri Nov 13, 2015 4:31 am
by mrbatnes
mark.monroe wrote:Hi bjornidar,
iX Developer doesn't understand how to add dynamics to your particular object. Like I mentioned before, it doesn't know which fill to add dynamics too. You would have to code the xaml yourself. Currently we do not have a xaml help document that details what all the markup tags mean.
Hi Mark,
are there any News about this subject? is it some other ways to add vector graphic to a ix Project? does the help document you mention exist at the moment?