Skip to content

Commit

Permalink
-un-reversed hatch patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
Spinelli committed Oct 20, 2016
1 parent 4863322 commit 0493cef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
30 changes: 14 additions & 16 deletions web/js/src/armyc2/c2sd/renderer/utilities/FillPatterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,28 +177,26 @@ return{
//pattern = 8;
if(pattern > 1 && pattern < 6)
{
if(pattern === 2)//forward diagonal /
if(pattern === 2)//forward diagonal \
{
//ctx.rotate(45*Math.PI/180);
ctx.beginPath();
ctx.moveTo(-1,16);
ctx.lineTo(16,-1);
ctx.moveTo(14,16);
ctx.lineTo(16,14);
ctx.moveTo(-1,1);
ctx.lineTo(1,-1);
ctx.stroke();
}
else if(pattern === 3)//backward diagonal \
{
//ctx.rotate(-90*Math.PI/180);
ctx.beginPath();
ctx.moveTo(15,15);
ctx.lineTo(-1,-1);
ctx.moveTo(1,16);
ctx.lineTo(-1,14);
ctx.moveTo(14,-1);
ctx.lineTo(16,1);
ctx.stroke();
}
else if(pattern === 3)//backward diagonal /
{
ctx.beginPath();
ctx.moveTo(-1,16);
ctx.lineTo(16,-1);
ctx.moveTo(14,16);
ctx.lineTo(16,14);
ctx.moveTo(-1,1);
ctx.lineTo(1,-1);
ctx.stroke();
}
else if(pattern === 4)//vertical |
Expand Down Expand Up @@ -292,11 +290,11 @@ return{
//pattern = 5;
if(pattern === 2)//forward diagonal /
{
svgPattern = svgHatch + "";//force copy
svgPattern = svgHatch.replace("rotate(45 0 0)","rotate(-45 0 0)");
}
else if(pattern === 3)//backward diagonal \
{
svgPattern = svgHatch.replace("rotate(45 0 0)","rotate(-45 0 0)");
svgPattern = svgHatch + "";//force copy
}
else if(pattern === 8)//cross X
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ armyc2.c2sd.renderer.utilities = armyc2.c2sd.renderer.utilities || {};
/** @class */
armyc2.c2sd.renderer.utilities.RendererSettings = (function () {

var _Version = "0.3.5";
var _Version = "0.3.6";
//outline approach. none, filled rectangle, outline (default),
//outline quick (outline will not exceed 1 pixels).
var _SymbologyStandard = 0,
Expand Down

0 comments on commit 0493cef

Please sign in to comment.