Subversion Repositories wimsdev

Rev

Rev 16344 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16344 Rev 17574
Line 92... Line 92...
92
  if(b<0) b=0;
92
  if(b<0) b=0;
93
  col=gdImageColorExact(image, r, g, b);
93
  col=gdImageColorExact(image, r, g, b);
94
  if(col==-1) col=gdImageColorAllocate(image,r,g,b);
94
  if(col==-1) col=gdImageColorAllocate(image,r,g,b);
95
  return col;
95
  return col;
96
}
96
}
-
 
97
 
-
 
98
int tikz_brushColor;
97
 
99
 
98
int widthcolor(int w, int color)
100
int widthcolor(int w, int color)
99
{
101
{
100
  int bg,fg,sh,e;
102
  int bg,fg,sh,e;
101
  /* already allocated */
103
  /* already allocated */
Line 105... Line 107...
105
  if(wimg==NULL) {
107
  if(wimg==NULL) {
106
    fly_error("width_creation_failure"); return color;
108
    fly_error("width_creation_failure"); return color;
107
  }
109
  }
108
  bg=gdImageColorAllocate(wimg,255,255,255);
110
  bg=gdImageColorAllocate(wimg,255,255,255);
109
  gdImageColorTransparent(wimg,bg);
111
  gdImageColorTransparent(wimg,bg);
-
 
112
  if (tikz_file) tikz_brushColor=color;
110
  fg=gdImageColorAllocate(wimg,gdImageRed(image,color),
113
  fg=gdImageColorAllocate(wimg,gdImageRed(image,color),
111
                      gdImageGreen(image,color),
114
                      gdImageGreen(image,color),
112
                      gdImageBlue(image,color));
115
                      gdImageBlue(image,color));
113
  e=w-1;sh=e/3;
116
  e=w-1;sh=e/3;
114
  switch(w) {
117
  switch(w) {