diff options
author | Robert Holcomb <bob_holcomb@hotmail.com> | 2010-03-23 04:22:33 +0300 |
---|---|---|
committer | Robert Holcomb <bob_holcomb@hotmail.com> | 2010-03-23 04:22:33 +0300 |
commit | d2225edfce87ecb92d19b56859146a0738027c7e (patch) | |
tree | 29130245b155676a38d5c44534cd109e736ea217 /source/blender/editors/space_image/image_draw.c | |
parent | 371732154b39413db0b24a006ae62f5f22e1f39a (diff) |
Added a line sampler to the histogram panel in the image space.
Patch #21712 from Xavier Thomas.
now updates in real time as you pull the line.
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 797bb20ddf9..0baa81fc699 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -158,6 +158,17 @@ void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *f UI_DrawString(10, 10, str); } +void draw_image_line(struct ARegion *ar, int x1, int y1, int x2, int y2) +{ + glColor3ub(0,0,0); + glBegin(GL_LINES); + + glVertex2i(x1, y1); + glVertex2i(x2, y2); + + glEnd(); +} + /* image drawing */ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) |