Nur in kdeaddons-3.2.3-patch/noatun-plugins/jefferson: .deps.
|
|
Nur in kdeaddons-3.2.3-patch/noatun-plugins/jefferson: Makefile.
|
|
Nur in kdeaddons-3.2.3-patch/noatun-plugins/nexscope: .deps.
|
|
Nur in kdeaddons-3.2.3-patch/noatun-plugins/nexscope: Makefile.
|
|
diff -dur kdeaddons-3.2.3/noatun-plugins/synaescope/polygon.h kdeaddons-3.2.3-patch/noatun-plugins/synaescope/polygon.h
|
|
--- kdeaddons-3.2.3/noatun-plugins/synaescope/polygon.h 2001-04-16 23:20:34.000000000 +0000
|
|
+++ kdeaddons-3.2.3-patch/noatun-plugins/synaescope/polygon.h 2004-06-20 13:56:39.000000000 +0000
|
|
@@ -9,46 +9,31 @@
|
|
Bitmap(int e=0) : extra(e), data(0) { };
|
|
~Bitmap() { delete[] data; };
|
|
|
|
- void size(int w,int h) {
|
|
- delete[] data;
|
|
- width = w;
|
|
- height = h;
|
|
- data = new Pixel[w*h+extra];
|
|
- clear();
|
|
- }
|
|
+ void size(int w,int h);
|
|
|
|
void clear() {
|
|
memset(data,0,sizeof(Pixel)*(width*height+extra));
|
|
}
|
|
};
|
|
|
|
+template <class Pixel> void Bitmap<Pixel>::size(int w,int h) {
|
|
+ delete[] data;
|
|
+ width = w;
|
|
+ height = h;
|
|
+ data = new Pixel[w*h+extra];
|
|
+ clear();
|
|
+}
|
|
+
|
|
template<class Pixel, class Combiner, int superSampleShift>
|
|
struct PolygonEngine : public Bitmap<Pixel>
|
|
{
|
|
- PolygonEngine() : Bitmap<Pixel>(1) { }
|
|
+ PolygonEngine() : Bitmap<Pixel>(1) { }
|
|
|
|
#define super (1<<superSampleShift)
|
|
- void apply(Pixel *dest)
|
|
- {
|
|
- Pixel sum=0;
|
|
- int count = width*height;
|
|
- Pixel *src = data;
|
|
- while(count--) {
|
|
- sum += *(src++);
|
|
- if (sum)
|
|
- *dest = Combiner::combine(sum,*dest);
|
|
- dest++;
|
|
- }
|
|
- }
|
|
|
|
- void add(Pixel color,int x,int y)
|
|
- {
|
|
- if (y < 0) return;
|
|
- if (y >= height) return;
|
|
- if (x < 0) x = 0;
|
|
- if (x > width) x = width;
|
|
- data[x+y*width] += color;
|
|
- }
|
|
+ void apply(Pixel *dest);
|
|
+
|
|
+ void add(Pixel color,int x,int y);
|
|
|
|
/* Color is char[layers] */
|
|
|
|
@@ -104,3 +89,26 @@
|
|
}
|
|
#undef super
|
|
};
|
|
+
|
|
+template<class Pixel, class Combiner, int superSampleShift>
|
|
+void PolygonEngine<Pixel,Combiner,superSampleShift>::apply(Pixel *dest)
|
|
+ {
|
|
+ unsigned short sum=0;
|
|
+ int count = Bitmap<Pixel>::width*Bitmap<Pixel>::height;
|
|
+ unsigned short* src = Bitmap<Pixel>::data;
|
|
+ while(count--) {
|
|
+ sum += *(src++);
|
|
+ if (sum)
|
|
+ *dest = Combiner::combine(sum,*dest);
|
|
+ dest++;
|
|
+ }
|
|
+ }
|
|
+template<class Pixel, class Combiner, int superSampleShift>
|
|
+void PolygonEngine<Pixel,Combiner,superSampleShift>::add(Pixel color,int x,int y)
|
|
+ {
|
|
+ if (y < 0) return;
|
|
+ if (y >= Bitmap<Pixel>::height) return;
|
|
+ if (x < 0) x = 0;
|
|
+ if (x > Bitmap<Pixel>::width) x = Bitmap<Pixel>::width;
|
|
+ Bitmap<Pixel>::data[x+y*Bitmap<Pixel>::width] += color;
|
|
+ }
|
|
diff -dur kdeaddons-3.2.3/noatun-plugins/tippercanoe/polygon.h kdeaddons-3.2.3-patch/noatun-plugins/tippercanoe/polygon.h
|
|
--- kdeaddons-3.2.3/noatun-plugins/tippercanoe/polygon.h 2001-04-16 22:04:03.000000000 +0000
|
|
+++ kdeaddons-3.2.3-patch/noatun-plugins/tippercanoe/polygon.h 2004-06-20 14:12:12.000000000 +0000
|
|
@@ -8,43 +8,29 @@
|
|
Bitmap(int e=0) : extra(e), data(0) { };
|
|
~Bitmap() { delete[] data; };
|
|
|
|
- void size(int w,int h) {
|
|
+ void size(int w, int h);
|
|
+
|
|
+ void clear() {
|
|
+ memset(data,0,sizeof(Pixel)*(width*height+extra));
|
|
+ }
|
|
+};
|
|
+
|
|
+ template <class Pixel> void Bitmap<Pixel>::size(int w,int h) {
|
|
delete[] data;
|
|
width = w;
|
|
height = h;
|
|
data = new Pixel[w*h+extra];
|
|
clear();
|
|
}
|
|
-
|
|
- void clear() {
|
|
- memset(data,0,sizeof(Pixel)*(width*height+extra));
|
|
- }
|
|
-};
|
|
|
|
template<class Pixel, class Combiner, int superSampleShift>
|
|
struct PolygonEngine : public Bitmap<Pixel> {
|
|
PolygonEngine() : Bitmap<Pixel>(1) { }
|
|
|
|
#define super (1<<superSampleShift)
|
|
- void apply(Pixel *dest) {
|
|
- Pixel sum=0;
|
|
- int count = width*height;
|
|
- Pixel *src = data;
|
|
- while(count--) {
|
|
- sum += *(src++);
|
|
- if (sum)
|
|
- *dest = Combiner::combine(sum,*dest);
|
|
- dest++;
|
|
- }
|
|
- }
|
|
+ void apply(Pixel *dest);
|
|
|
|
- void add(Pixel color,int x,int y) {
|
|
- if (y < 0) return;
|
|
- if (y >= height) return;
|
|
- if (x < 0) x = 0;
|
|
- if (x > width) x = width;
|
|
- data[x+y*width] += color;
|
|
- }
|
|
+ void add(Pixel color,int x,int y);
|
|
|
|
/* Color is char[layers] */
|
|
|
|
@@ -96,3 +82,24 @@
|
|
}
|
|
#undef super
|
|
};
|
|
+
|
|
+template<class Pixel, class Combiner, int superSampleShift>
|
|
+void PolygonEngine<Pixel,Combiner,superSampleShift>::apply(Pixel *dest) {
|
|
+ Pixel sum=0;
|
|
+ int count = Bitmap<Pixel>::width*Bitmap<Pixel>::height;
|
|
+ Pixel *src = Bitmap<Pixel>::data;
|
|
+ while(count--) {
|
|
+ sum += *(src++);
|
|
+ if (sum)
|
|
+ *dest = Combiner::combine(sum,*dest);
|
|
+ dest++;
|
|
+ }
|
|
+ }
|
|
+template<class Pixel, class Combiner, int superSampleShift>
|
|
+void PolygonEngine<Pixel,Combiner,superSampleShift>::add(Pixel color,int x,int y) {
|
|
+ if (y < 0) return;
|
|
+ if (y >= Bitmap<Pixel>::height) return;
|
|
+ if (x < 0) x = 0;
|
|
+ if (x > Bitmap<Pixel>::width) x = Bitmap<Pixel>::width;
|
|
+ Bitmap<Pixel>::data[x+y*Bitmap<Pixel>::width] += color;
|
|
+ }
|
|
Nur in kdeaddons-3.2.3-patch/noatun-plugins/tippercanoe: polygon.h~.
|