~jbicha/ubuntu/oneiric/gjs/1.29.18

« back to all changes in this revision

Viewing changes to test/js/testCairo.js

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2011-02-06 13:01:02 UTC
  • mfrom: (1.3.10 experimental)
  • Revision ID: james.westby@ubuntu.com-20110206130102-69xpqq0gql9fob01
Tags: 0.7.10-1
* New upstream release.
* debian/control.in:
  - Drop build-depend on libmozjs-dev
  - Make libgjs-dev depend on xulrunner-dev and libdbus-1-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// application/javascript;version=1.8
1
2
const Cairo = imports.cairo;
2
3
 
3
4
function _ts(obj) {
97
98
    cr.scale(10, 10);
98
99
    cr.rotate(180);
99
100
    cr.identityMatrix();
100
 
    let rv = cr.userToDevice();
 
101
    let rv = cr.userToDevice(0, 0);
101
102
    assertEquals("userToDevice", rv.length, 2);
102
103
 
103
 
    let rv = cr.userToDeviceDistance();
 
104
    let rv = cr.userToDeviceDistance(0, 0);
104
105
    assertEquals("userToDeviceDistance", rv.length, 2);
105
106
 
106
 
    let rv = cr.deviceToUser();
 
107
    let rv = cr.deviceToUser(0, 0);
107
108
    assertEquals("deviceToUser", rv.length, 2);
108
109
 
109
 
    let rv = cr.deviceToUserDistance();
 
110
    let rv = cr.deviceToUserDistance(0, 0);
110
111
    assertEquals("deviceToUserDistance", rv.length, 2);
111
112
 
112
113
    cr.showText("foobar");
113
114
 
114
115
    cr.moveTo(0, 0);
 
116
    cr.setDash([1, 0.5], 1)
115
117
    cr.lineTo(1, 0);
116
118
    cr.lineTo(1, 1);
117
119
    cr.lineTo(0, 1);