Lines Matching refs:a

1 /// @brief The SketchCanvas class accepts a canvas object to draw on.
57 canvas.setAttribute("tabindex", 0); // Make sure the canvas can have a key focus
65 // Set a placeholder function to ignore setLineDash method for browsers that don't support it.
122 // Draw a rectangle
166 /// Returns bounding box of a toolbar button.
246 // Returns bounding box for a drawing object.
264 // Check if a point intersects with a rectangle
300 // when a diagonal line gets deleted by clicking on seemingly
385 // Grab a control point uder the mouse cursor to move it.
390 // control points. Written as a local function to clarify logic.
425 // do{ ... }while(false) statement could do a similar trick, but we prefer
459 if(0 <= menuno) // If we are clicking on a menu button, ignore this event
475 // when a diagonal line gets deleted by clicking on seemingly
480 // Single click always selects a single shape.
526 // If we're starting dragging on a selected object, enter moving mode.
660 // Relatively move a control point if it exists
670 // When moving a vertex, Bezier control points associated with that vertex
688 // curve seems smooth. A line between a cubic Bezier spline curve's control point
696 // Sometimes the user wants to make a non-smooth path, so this functionality can be
810 /// Draw a shape on the canvas.
838 /// Returns a small rectangle surrounding the given point which is suitable for mouse-picking.
865 /// Draw a handle rectangle or a circle around a vertex or a control point
952 // Draws dashed line that connects a control point and its associated vertex
1014 // Values with defaults needs not assigned a value when saved.
1268 /// @brief Loads a data from local storage of the browser
1290 // The event handler is assigned here because xmlHttp is a free variable
1319 // The event handler is assigned here because xmlHttp is a free variable
1422 /// Selects a toolbar button. Returns true if the coordinates hit a button.
1459 /// @brief Save a sketch data to a local storage entry with name
1486 // If we'd repeat this procedure, we may be able to use a shim in:
1523 // Create a deep clone of objects
1572 /// @brief Posts a sketch data to the server
1581 // The event handler is assigned here because xmlHttp is a free variable
1601 /// @brief Posts a request to server to pull from remote (respective to the server)
1607 // The event handler is assigned here because xmlHttp is a free variable
1622 /// @brief Posts a request to server to push to remote (respective to the server)
1628 // The event handler is assigned here because xmlHttp is a free variable
1700 // a text input element.
1734 // screw up in deeply nested DOM tree (which may have a positioned ancestor).
1755 /// @brief Converts a sequence (array) to a set (object)
1763 /// If we serialize the object, it would be an !!map instead of a !!set.
1764 /// For example, a !!set {head, tail} would be serialized as
1772 /// a set-like object, while set2seq does the opposite.
1787 /// @brief Converts a set (object) to a sequence (array)
1804 /// @brief A class that represents a tool in the toolbar.
1812 /// draw: A function(mode,str) to actually draw a shape.
1841 /// Append a point to the shape by mouse click
1991 // Pathedit tool's delete key just delete single vertex in a path
2114 var a = [{x:x+20, y:y+20}, {x:x+40, y:y}];
2115 l_hige(ctx, a);
2116 //a[0] = {x:x+10, y:y+10};
2117 a[1] = {x:x, y:y};
2118 l_hige(ctx, a);
2126 var a = new Array(2);
2127 a[0] = arr[1];
2128 a[1] = arr[2];
2129 l_hige(ctx, a);
2130 a[1] = arr[0];
2131 l_hige(ctx, a);
2268 // a text input element.
2285 // Create and assign the input element to a field of the textLayer object
2298 // Add a text area for link
2318 // If a shape is clicked, alter its value instead of adding a new one.
2346 // screw up in deeply nested DOM tree (which may have a positioned ancestor).
2451 var first = arr[0], first2 = arr[1], a = [];
2453 a[0] = {x: first2.cx, y: first2.cy};
2455 a[0] = {x: first2.dx, y: first2.dy};
2457 a[0] = first2;
2458 a[1] = first;
2460 l_hige(ctx, a);
2463 var last = arr[arr.length-1], last2 = arr[arr.length-2], a = [];
2465 a[0] = {x: last.dx, y: last.dy};
2467 a[0] = {x: last.cx, y: last.cy};
2469 a[0] = last2;
2470 a[1] = last;
2472 l_hige(ctx, a);
2476 // Draws dashed line that connects a control point and its associated vertex
2497 onNewShape: function(shape){}, /// Virtual event handler on creation of a new shape
2645 // It's kept as a member variable in order to reuse in the second and later invocations.
2669 // Create and return a XMLHttpRequest object or ActiveXObject for IE6-