~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to test/xaml/assorted/clipping-updates-inkpresenter.html

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 
2
<head>
 
3
<title>InkPresenter Clipping Update test</title>
 
4
<meta></meta>
 
5
</head>
 
6
<body>
 
7
 
 
8
<script type="text/javascript">
 
9
function OnMouseEnter (sender, eventArgs)
 
10
{
 
11
        sender.findName ("LowerLeft").point = "0,125";
 
12
        sender.findName ("LowerRight").point = "100,125";
 
13
        sender.findName ("UpperRight").point = "100,-25";
 
14
}
 
15
function OnMouseLeave (sender, eventArgs)
 
16
{
 
17
        sender.findName ("LowerLeft").point = "0,10";
 
18
        sender.findName ("LowerRight").point = "10,10";
 
19
        sender.findName ("UpperRight").point = "10,0";
 
20
}
 
21
 
 
22
</script>
 
23
 
 
24
<object type="application/x-silverlight" data="data:," id="slControl" width="500" height="525">
 
25
<param name="background" value="#FFFFFF"/>
 
26
<param name="source" value="#xamlContent"/>
 
27
</object>
 
28
 
 
29
<script type="text/xaml" id="xamlContent">
 
30
<?xml version="1.0"?>
 
31
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
32
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
33
        x:Name="root" MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave">
 
34
 
 
35
  <InkPresenter x:Name="foo" Canvas.Top="50" Canvas.Left="50">
 
36
    <InkPresenter.Strokes>
 
37
      <Stroke>
 
38
        <Stroke.DrawingAttributes>
 
39
          <DrawingAttributes Color="#FFFF0000" Height="5" Width="5"/>
 
40
        </Stroke.DrawingAttributes>
 
41
        <Stroke.StylusPoints>
 
42
          <StylusPoint X="100" Y="-25" />
 
43
          <StylusPoint X="225" Y="85" />
 
44
          <StylusPoint X="100" Y="200" />
 
45
          <StylusPoint X="-25" Y="85" />
 
46
          <StylusPoint X="100" Y="-25" />
 
47
        </Stroke.StylusPoints>
 
48
      </Stroke>
 
49
    </InkPresenter.Strokes>
 
50
    <InkPresenter.Clip>
 
51
      <PathGeometry>
 
52
        <PathFigure>
 
53
          <LineSegment Point="0,0"/>
 
54
          <LineSegment x:Name="LowerLeft" Point="0,10"/>
 
55
          <LineSegment x:Name="LowerRight" Point="10,10"/>
 
56
          <LineSegment x:Name="UpperRight" Point="10,0"/>
 
57
          <LineSegment Point="0,0"/>
 
58
        </PathFigure>
 
59
      </PathGeometry>
 
60
    </InkPresenter.Clip>
 
61
    <Image Width="100" Height="125" Source="moonlight_logo.png"/>
 
62
  </InkPresenter>
 
63
 
 
64
</Canvas>
 
65
</script>
 
66
 
 
67
</body>
 
68
</html>