Draw a line using a part of the source image
<Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WPF" Height="300" Width="300"> <Canvas Margin="5"> <Line X1="20" X2="280" Y1="240" Y2="240" StrokeThickness="30"> <Line.Stroke> <ImageBrush ImageSource="c:\image.jpg" Viewbox="30,46,42,15" ViewboxUnits="Absolute" /> </Line.Stroke> </Line> </Canvas> </Window>