src/hg/instinct/hgGeneset/hgGenesets.h 1.3

1.3 2010/01/22 05:11:28 jsanborn
updated drawing code
Index: src/hg/instinct/hgGeneset/hgGenesets.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgGeneset/hgGenesets.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -B -U 4 -r1.2 -r1.3
--- src/hg/instinct/hgGeneset/hgGenesets.h	21 Jan 2010 23:51:13 -0000	1.2
+++ src/hg/instinct/hgGeneset/hgGenesets.h	22 Jan 2010 05:11:28 -0000	1.3
@@ -11,9 +10,9 @@
 #define DEBUG 1
 #define VERSION "0.1"
 
 /*** Prefixes for variables in cart we don't share with other apps. ***/
-#define bioIntPrefix "hgg_"
+#define hghPrefix "hgg_"
 #define hghDo hghPrefix "do"
 
 #define hghTableName hghPrefix "tableName"
 
@@ -25,8 +24,16 @@
 #define hghMaxGapToFill hghPrefix "maxGapToFill"
 #define hghImageWidth hghPrefix "imageWidth"
 #define hghDataConfigPrefix hghPrefix "data_" 
 
+#define hghMode hghPrefix "mode"
+#define hghDatasetId hghPrefix "dataset"
+#define hghSampleIds hghPrefix "samples"
+#define hghFeatureIds hghPrefix "features"
+#define hghWidth hghPrefix "width"
+#define hghHeight hghPrefix "height"
+
+
 /** Commands from Javascript client **/
 
 #define bioIntPrefix "hgg_"
 
@@ -39,13 +46,10 @@
 #define bioIntFeatureName bioIntPrefix "feature_name"
 #define bioIntTakeTop bioIntPrefix "take_top"
 #define bioIntSourceName bioIntPrefix "source"
 
-#define hgh3Prefix "hgh3_"
-#define hgh3Mode hgh3Prefix "mode"
-#define hgh3DatasetId hgh3Prefix "dataset"
-#define hgh3SampleIds hgh3Prefix "samples"
-#define hgh3FeatureIds hgh3Prefix "features"
+#define DEFAULT_HEATMAP_WIDTH 500
+#define DEFAULT_HEATMAP_HEIGHT 500
 
 /* ---- Global variables declared in hgHeatmap.c */
 extern struct cart *cart;	/* This holds cgi and other variables between clicks. */
 
@@ -64,10 +68,10 @@
 
     int width;
     int height;
 
-    int x_scale;
-    int y_scale;
+    double x_scale;
+    double y_scale;
 
     struct rgbColor *low;
     struct rgbColor *zero;
     struct rgbColor *high;
@@ -76,10 +80,21 @@
     struct hash *x_index;
     struct hash *y_index;
 };
 
+struct hmPixel {
+    struct hmPixel *next;
+    int x;
+    int y;
+    int w;
+    int h;
+
+    double val;
+    int count;
+};
+
 struct mapSettings *initMapSettings(struct slName *samples, struct slName *features,
-				    int x_scale, int y_scale);
+				    int width, int height);
 
 char *heatmapGif(struct sqlConnection *conn, struct rawData *rdList,
 		 struct mapSettings *settings);