Example #1
0
asyncTest('polygon', 1, function() {
   gamejs.draw.polygon(surface, '#ff0000', [[1,1], [5,5], [44, 44], [2,2], [99, 99], [43, 75]], 0);
   surfaceEqual(surface, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAC8ElEQVR4nO3brauUURSF8UcUEYMYDAaDxWIxKYLNJBabQbDZbDZBuCfZbDabYDAZTTaLJovFYjAYDGIQEcVlmAHneufj/Zhz9p6Z9fsLzssDm+FyF1g+gsvRb7AZgvOCB9HvsBmCx4IS/Q6bEpwSfHWURAT3BHKUJARHBR8cJRHBjWkQR8lC8MpREhFcEPx2lEQET2aCOEo0wWnBN0dJRHD/vyCOEklwTPDRURIR3JwTxFGiCA4JXjtKIoKLgj+Okojg6YIgjhJBcEbw3VESEewtCeIorQmOCz45SiKC2yuCOEpL05/Bbx0lEcGVJT+DHSWC4HmHII7SiuCs4IejJCJ42DGIo7QgOCH47CiJCO70COIotQkOC945SiKCqz2DOEptgheOkojgnOCnoyQieDQgiKPUIjgp+OIoiQjuDgziKDUIjgjeO0oigmsjgjhKDYKXjpKIJkPSX46SiCZD0jFBHGWd9G9I6ihZ6N+Q1FEy0P4hqaNkoP1DUkfJQPuHpI4STQeHpI4STQeHpI4SSfOHpI4SSfOHpI4SRYuHpI4SRYuHpI4SQcuHpI4SQcuHpI4SQcuHpI7SmlYPSR2lNa0ekjpKS+o2JHWUltRtSOooraj7kNRRWlH3IamjtKLuQ1JHaUH9hqSO0oL6DUkdpTb1H5I6Sm3qPyR1lJo0bEjqKDVp2JDUUWrSsCGpo9Si4UNSR6lFw4ekjlKDxg1JHaUGjRuSOsq6afyQ1FHWTeOHpI6yboJLgmeK+eXlKIto8j/Ce2r7Ny9HWUWTddYtwRtHSSbgnJXob94Ijc9Zif7ejdHwnJXob904Dc5Zif7GjVT5nJXo79tYFc9Zif62jVfhnJXob9oKaz5nJfp7tsYaz1mJ/pats4ZzVqK/YSuNPGcl+v1ba8Q5K9Fv33oDzlmJfvNO6HnOSvR7d0aPc1ai37pzOpyzEv3GnbTinJXo9+2sJeesRL9t5805ZyX6TcaBc1ai32NTM+fsevRbbI6/XDnAE7R11d4AAAAASUVORK5CYII=",
      start
   );
});
Example #2
0
asyncTest('polygon2', 1, function() {
   gamejs.draw.polygon(surface, '#ff0000', [[1,1], [5,5], [44, 44], [2,2], [99, 99], [43, 75]], 5);
   surfaceEqual(surface, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAD7ElEQVR4nO2bIahVWRSGPxURYTAIBotBEIvJZHrJaLIJBmGCzWS0aDQZTSZtJqPJJjNM0WKxCIoghhlEcET9DfcMPC57n7PPPmvvcxn/D046e691WR93wbu8H4H2PW8FZzDrsSXEUtYmIcRS1iQjxFLWQvDaUnYIweURIZayBoJnlrJDCM4LvlvKDiF4MCHEUnoiOCn4ZCk7hOBWgRBL6YXgqOCNpewQgiuFQiylB4IDgueWskMILgh+WMoOIXiYGX5OlKW0RHBK8Dkx+BfD8C2lN4I7mcH/bikrIPhN8C4x9L8EZy1lBQTXMkO/JjhjKZ0RHBy+EdsDfzd8gyylN4K9zMDvDO8tpTeCx4lhfxacGt5bSk8EpwVfEsN+uO+MpfREcDcx6B+CC/vOWEovBMcEHxKDfi44sO+cpfRCcD0z6Ctb5yylB4JDgpeJIb8RHN06ayk9EFzMDPlW4qyl9EDwJDHgT4KTibOW0hptfsv6mhjwg8x5S2mN4F5iuN8F5zPnLaUlguOCj4nhPhu5YyktEdzIDPfyyB1LaYXgsOBVYrCvBUdG7llKKwSXMoO9OXHPUloheJoY6t+CExP3LKUFgnOCb4mh3i+4ayktENxPDPSb4FzBXUuJRnBiWFPbA31aeN9SohHczAz0UuF9S4lEcETpIOkrweHCGpYSifJB0hszalhKJEoHST8Kjs+oYSlRKB8kvTezjqVEoXSQ9Kvg7Mw6lhKB8kHSJxW1LCUC5YOkFytqWcpSlA+SvhQcqqhnKUtRPkh6vbKepSxB+SDpB8GxypqWsgTlg6R3F9S0lCUoHST9Iji9oKal1KJ8kPTxwrqWUovyQdK9hXUtpQaNB0kPLqxtKTVoJEgaUNtS5qKJIGlAfUuZiyaCpAH1LWUumgiSBtS3lDmoIEga0MNS5qCCIGlAD0spRYVB0oA+llKKCoOkAX0spQTNCJIG9LKUEjQjSBrQy1JK0IwgaUAvS5lCM4OkAf0sZQrNDJIG9LOUMVQRJA3oaSljqCJIGtDTUnKoMkga0NdScqgySBrQ11JyKB0k/VfwSIG/dSX6WkoK5YOk/z1/CK62WGOWkkHpIOn2815wW8F/QFpKAm2CpP8USGmyziwlgTaxhtvDN6FETOg6s5QM2gRKrw7DLhUTss4sZQJt/lf40bCmuqwzSymg9zqzlEJ6rjNLmUmPdWYpFbReZ5ZSSct1ZikLabHOLCWA6HVmKUFErjNLCSZinVlKA5auM0tpxMJ1tmcpDalcZ3+OvLeUCCrXmaW0pnKdWUoPKtaZpfRg4TqzlFYsWGdv1/7s/3vmrrO1P+8vQ+k6W/tz/nJMrbOfR/6weO+F9rkAAAAASUVORK5CYII=",
      start
   );
});
Example #3
0
 this.container.on(GUI.EVT_PAINT, function(){
     gamejs.draw.polygon(this.surface, skin.alias_background, [[0, 110], [420, 110], [390, 180], [0, 180]]);
 }, this.container);