Source

boxer / boxer

Diff from to
 
 sub make_side
 {
-	my ($x_dim, $num_x_tabs) = @_;
+	my ($x_dim, $num_x_tabs, $inset) = @_;
 	my @points;
 
 	# Bottom edge
-	push @points, [0,0];
+	if ($inset)
+	{
+		push @points, [$thickness, 0];
+	} else {
+		push @points, [0,0];
+	}
+
 	my $x = $x_dim / 2 - $tab_width * ($num_x_tabs - 0.5);
 	for my $n (1..$num_x_tabs)
 	{
 	}
 
 	# Height edge
-	push @points, [$x_dim - $thickness, 0];
+	if ($inset)
+	{
+		push @points, [$x_dim - $thickness, 0];
+	} else {
+		push @points, [$x_dim, 0];
+	}
+
 	my $z = $height/2 - $tab_width * ($num_z_tabs - 0.5);
 	for my $n (1..$num_z_tabs)
 	{
-		push @points,
-			[$x_dim - $thickness, $z - $kerf],
-			[$x_dim, $z - $kerf],
-			[$x_dim, $z + $tab_width + $kerf],
-			[$x_dim - $thickness, $z + $tab_width + $kerf],
-			;
+		if ($inset)
+		{
+			push @points,
+				[$x_dim - $thickness, $z - $kerf],
+				[$x_dim, $z + $kerf],
+				[$x_dim, $z + $tab_width - $kerf],
+				[$x_dim - $thickness, $z + $tab_width + $kerf],
+				;
+		} else {
+			push @points,
+				[$x_dim, $z - $kerf],
+				[$x_dim - $thickness, $z + $kerf],
+				[$x_dim - $thickness, $z + $tab_width - $kerf],
+				[$x_dim, $z + $tab_width + $kerf],
+				;
+		}
+
 		$z += $tab_width * 2;
 	}
 
-	# Top eddge
-	push @points, [$x_dim - $thickness, $height];
+	# Top edge
+	if ($inset)
+	{
+		push @points, [$x_dim - $thickness, $height];
+	} else {
+		push @points, [$x_dim, $height];
+	}
+
 	$x = $x_dim / 2 + $tab_width * ($num_x_tabs - 0.5);
+
 	for my $n (1..$num_x_tabs)
 	{
 		push @points,
 	}
 
 	# Height edge
-	push @points, [0, $height];
+	if ($inset)
+	{
+		push @points, [$thickness, $height];
+	} else {
+		push @points, [0, $height];
+	}
+
 	$z = $height/2 + $tab_width * ($num_z_tabs - 0.5);
 	for my $n (1..$num_z_tabs)
 	{
-		push @points,
-			[0, $z + $kerf],
-			[$thickness, $z - $kerf],
-			[$thickness, $z + $kerf - $tab_width],
-			[0, $z - $kerf - $tab_width],
-			;
+		if ($inset)
+		{
+			push @points,
+				[$thickness, $z + $kerf],
+				[0, $z - $kerf],
+				[0, $z + $kerf - $tab_width],
+				[$thickness, $z - $kerf - $tab_width],
+				;
+		} else {
+			push @points,
+				[0, $z + $kerf],
+				[$thickness, $z - $kerf],
+				[$thickness, $z + $kerf - $tab_width],
+				[0, $z - $kerf - $tab_width],
+				;
+		}
 		$z -= $tab_width * 2;
 	}
 
 	# Close it back to the bottom
-	push @points, [0,0];
+	if ($inset)
+	{
+		push @points, [$thickness, 0];
+	} else {
+		push @points, [0, 0];
+	}
 
 	return make_path(@points);
 }
 print make_group("translate(" . ($width+$spacing) .",0)", make_top());
 print make_group(
 	make_translate(0, $length + $spacing),
-	make_side($width, $num_x_tabs)
+	make_side($width, $num_x_tabs, 0)
 );
 print make_group(
 	make_translate($width + $spacing, $length + $spacing),
-	make_side($width, $num_x_tabs)
+	make_side($width, $num_x_tabs, 0)
 );
 
 print make_group(
 	make_translate(0, $length + $height + $spacing * 2),
-	make_side($length, $num_y_tabs)
+	make_side($length, $num_y_tabs, 1)
 );
 print make_group(
 	make_translate($length + $spacing, $length + $height + $spacing * 2),
-	make_side($length, $num_y_tabs)
+	make_side($length, $num_y_tabs, 1)
 );
 
 print <<"";
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.