Browse Source

clean up lines

Taco 1 year ago
parent
commit
562381249b
3 changed files with 740 additions and 509 deletions
  1. 620 441
      diff.xml
  2. 83 57
      entitlements.html
  3. 37 11
      entitlements.org

File diff suppressed because it is too large
+ 620 - 441
diff.xml


File diff suppressed because it is too large
+ 83 - 57
entitlements.html


+ 37 - 11
entitlements.org

@@ -202,7 +202,7 @@ It overrides the default privacy level specified by the property type.
202 202
  end 
203 203
  
204 204
  # sort the contexts by contextType
205
- sorted = contexts.sort_by { | c | c[:context_type] }
205
+ sorted = contexts.sort { | a, b | [a[:context_type], a[:pl_mean]] <=> [b[:context_type], b[:pl_mean]] }
206 206
  profile[:contexts] = sorted
207 207
  puts profile.to_json
208 208
 #+END_SRC
@@ -1755,7 +1755,7 @@ void draw()
1755 1755
 {
1756 1756
   background(255);
1757 1757
   drawTitle();
1758
-  drawBorder();
1758
+  //drawBorder();
1759 1759
   drawSectors();
1760 1760
   drawCurrentContext();
1761 1761
   drawRequest();
@@ -1866,10 +1866,14 @@ void drawDiff(Context c, color contextColor)
1866 1866
 //draw Sectors for each context as pie pieces
1867 1867
 void drawSectors()
1868 1868
 {
1869
+  noStroke();
1869 1870
   int count = 0;
1870 1871
   float begin = (PI/2);
1871 1872
   float end = begin + eqd_angle;
1872
-  noStroke();
1873
+
1874
+
1875
+  int previousContextType = contexts[0].contextType;
1876
+
1873 1877
   for(Context context : contexts)
1874 1878
   { 
1875 1879
     color contextColor = getColor(context.plMean, context.contextType);
@@ -1879,28 +1883,50 @@ void drawSectors()
1879 1883
 
1880 1884
     fill(contextColor);
1881 1885
     arc(centerX, centerY, contextSize, contextSize, begin, end);
1886
+    
1887
+    int ext = 20;
1882 1888
 
1883
-        
1884 1889
     if(count == currentContext)
1885 1890
     {
1886 1891
       noStroke();
1887
-      arc(centerX, centerY, contextSize + 20, contextSize + 20, begin, end);
1892
+      arc(centerX, centerY, contextSize + ext , contextSize + ext, begin, end);
1893
+    }
1894
+
1895
+    if(context.contextType != previousContextType)
1896
+    {
1897
+      stroke(255);
1898
+      strokeWeight(3);
1888 1899
     }
1889 1900
     else
1890 1901
     {
1891
-      //draw white line as divider
1892
-      float angle = (PI/2) + (count * eqd_angle);
1893
-      float x = centerX + (contextSize/2) * cos(angle);
1894
-      float y = centerY + (contextSize/2) * sin(angle);
1902
+      ext = 0;
1895 1903
       stroke(darkContextColor);
1896
-      line(centerX,centerY,x,y);
1897
-      noStroke();
1904
+      strokeWeight(1);
1898 1905
     }
1899 1906
 
1907
+    
1908
+    //draw white line as divider
1909
+    float angle = (PI/2) + (count * eqd_angle);
1910
+    float x = centerX + (contextSize/2 + ext) * cos(angle);
1911
+    float y = centerY + (contextSize/2 + ext) * sin(angle);
1912
+    line(centerX,centerY,x,y);
1913
+    noStroke();
1914
+
1915
+    strokeWeight(1);
1916
+
1900 1917
     begin = end;
1901 1918
     end = begin + eqd_angle;
1919
+    previousContextType = context.contextType;
1920
+
1902 1921
     count++;
1903 1922
   }
1923
+
1924
+  //draw first white divider from center down.
1925
+  stroke(255);
1926
+  strokeWeight(3);
1927
+  line(centerX,centerY,centerX,centerY + contextSize/2);
1928
+  strokeWeight(1);
1929
+
1904 1930
 }
1905 1931
 
1906 1932
 //draw outer rim