1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 (function() { 6 /** @const */ var WIDTH = 14; 7 /** @const */ var HEIGHT = WIDTH / 2 + 2; 8 /** @const */ var MARGIN = 1; 9 var ctx = document.getCSSCanvasContext('2d', 10 'tree-triangle', 11 WIDTH + MARGIN * 2, 12 HEIGHT + MARGIN * 2); 13 14 ctx.fillStyle = '#7a7a7a'; 15 ctx.translate(MARGIN, MARGIN); 16 17 ctx.beginPath(); 18 ctx.moveTo(0, 0); 19 ctx.lineTo(0, 2); 20 ctx.lineTo(WIDTH / 2, HEIGHT); 21 ctx.lineTo(WIDTH, 2); 22 ctx.lineTo(WIDTH, 0); 23 ctx.closePath(); 24 ctx.fill(); 25 ctx.stroke(); 26 })(); 27