Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Vector graphics
PostPosted: Thu May 31, 2012 1:09 am 

Joined: Thu Nov 17, 2011 2:10 am
Posts: 49
Location: Norway

Offline
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:
  <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?


 Profile  
 
 Post subject: Re: Vector graphics
PostPosted: Thu May 31, 2012 7:28 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
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:
<?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>

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Vector graphics
PostPosted: Thu May 31, 2012 11:32 pm 

Joined: Thu Nov 17, 2011 2:10 am
Posts: 49
Location: Norway

Offline
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.


 Profile  
 
 Post subject: Re: Vector graphics
PostPosted: Fri Jun 01, 2012 7:10 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
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.

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Vector graphics
PostPosted: Fri Nov 13, 2015 4:31 am 

Joined: Sun Jan 04, 2015 2:13 pm
Posts: 2

Offline
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?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: