diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-28 15:53:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-28 15:53:18 +0400 |
commit | ed61bfc9a6580360805a3daae1003df43a7f2c11 (patch) | |
tree | 29ee3248e82a5109b241127b1c2397ca11bf7bcb /source/blender/editors/space_image/image_draw.c | |
parent | ca8d262e89c25d15368ec4eb2fe80111e732e1f7 (diff) |
style cleanup
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index b4cb4f5f210..29bd5f5117d 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -85,7 +85,7 @@ static void image_verify_buffer_float(Image *ima, ImBuf *ibuf, int color_manage) * NOTE: if float buffer changes, we have to manually remove the rect */ - if (ibuf->rect_float && (ibuf->rect==NULL || (ibuf->userflags & IB_RECT_INVALID)) ) { + if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID)) ) { if (color_manage) { if (ima && ima->source == IMA_SRC_VIEWER) ibuf->profile = IB_PROFILE_LINEAR_RGB; @@ -101,7 +101,7 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar) { RenderResult *rr; - rr= BKE_image_acquire_renderresult(scene, ima); + rr = BKE_image_acquire_renderresult(scene, ima); if (rr && rr->text) { ED_region_info_draw(ar, rr->text, 1, 0.25); @@ -115,7 +115,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int const unsigned char cp[4], const float fp[4], int *zp, float *zpf) { char str[256]; - float dx= 6; + float dx = 6; /* text colors */ /* XXX colored text not allowed in Blender UI */ #if 0 @@ -127,10 +127,10 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int unsigned char green[3] = {255, 255, 255}; unsigned char blue[3] = {255, 255, 255}; #endif - float hue=0, sat=0, val=0, lum=0, u=0, v=0; + float hue = 0, sat = 0, val = 0, lum = 0, u = 0, v = 0; float col[4], finalcol[4]; - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); /* noisy, high contrast make impossible to read if lower alpha is used. */ @@ -149,7 +149,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int if (zp) { glColor3ub(255, 255, 255); - BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff)); + BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f + 0.5f * (((float)*zp) / (float)0x7fffffff)); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -211,19 +211,19 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int } /* color rectangle */ - if (channels==1) { + if (channels == 1) { if (fp) { col[0] = col[1] = col[2] = fp[0]; } else if (cp) { - col[0] = col[1] = col[2] = (float)cp[0]/255.0f; + col[0] = col[1] = col[2] = (float)cp[0] / 255.0f; } else { col[0] = col[1] = col[2] = 0.0f; } col[3] = 1.0f; } - else if (channels==3) { + else if (channels == 3) { if (fp) { copy_v3_v3(col, fp); } @@ -235,7 +235,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int } col[3] = 1.0f; } - else if (channels==4) { + else if (channels == 4) { if (fp) copy_v4_v4(col, fp); else if (cp) { @@ -262,8 +262,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int glBegin(GL_QUADS); glVertex2f(dx, 3); glVertex2f(dx, 17); - glVertex2f(dx+30, 17); - glVertex2f(dx+30, 3); + glVertex2f(dx + 30, 17); + glVertex2f(dx + 30, 3); glEnd(); /* draw outline */ @@ -271,8 +271,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int glBegin(GL_LINE_LOOP); glVertex2f(dx, 3); glVertex2f(dx, 17); - glVertex2f(dx+30, 17); - glVertex2f(dx+30, 3); + glVertex2f(dx + 30, 17); + glVertex2f(dx + 30, 3); glEnd(); dx += 35; @@ -284,8 +284,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int rgb_to_yuv(fp[0], fp[0], fp[0], &lum, &u, &v); } else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &lum, &u, &v); + rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[0] / 255.0f, (float)cp[0] / 255.0f, &hue, &sat, &val); + rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[0] / 255.0f, (float)cp[0] / 255.0f, &lum, &u, &v); } BLI_snprintf(str, sizeof(str), "V:%-.4f", val); @@ -304,8 +304,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v); } else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &lum, &u, &v); + rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &hue, &sat, &val); + rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &lum, &u, &v); } BLI_snprintf(str, sizeof(str), "H:%-.4f", hue); @@ -336,7 +336,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) { - float gridsize, gridstep= 1.0f/32.0f; + float gridsize, gridstep = 1.0f / 32.0f; float fac, blendfac; int x1, y1, x2, y2; @@ -348,47 +348,47 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) glRectf(x1, y1, x2, y2); /* gridsize adapted to zoom level */ - gridsize= 0.5f*(zoomx+zoomy); - if (gridsize<=0.0f) return; + gridsize = 0.5f * (zoomx + zoomy); + if (gridsize <= 0.0f) return; - if (gridsize<1.0f) { - while (gridsize<1.0f) { - gridsize*= 4.0f; - gridstep*= 4.0f; + if (gridsize < 1.0f) { + while (gridsize < 1.0f) { + gridsize *= 4.0f; + gridstep *= 4.0f; } } else { - while (gridsize>=4.0f) { - gridsize/= 4.0f; - gridstep/= 4.0f; + while (gridsize >= 4.0f) { + gridsize /= 4.0f; + gridstep /= 4.0f; } } /* the fine resolution level */ - blendfac= 0.25f*gridsize - floorf(0.25f*gridsize); + blendfac = 0.25f * gridsize - floorf(0.25f * gridsize); CLAMP(blendfac, 0.0f, 1.0f); - UI_ThemeColorShade(TH_BACK, (int)(20.0f*(1.0f-blendfac))); + UI_ThemeColorShade(TH_BACK, (int)(20.0f * (1.0f - blendfac))); - fac= 0.0f; + fac = 0.0f; glBegin(GL_LINES); - while (fac<1.0f) { - glVertex2f(x1, y1*(1.0f-fac) + y2*fac); - glVertex2f(x2, y1*(1.0f-fac) + y2*fac); - glVertex2f(x1*(1.0f-fac) + x2*fac, y1); - glVertex2f(x1*(1.0f-fac) + x2*fac, y2); - fac+= gridstep; + while (fac < 1.0f) { + glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2); + fac += gridstep; } /* the large resolution level */ UI_ThemeColor(TH_BACK); - fac= 0.0f; - while (fac<1.0f) { - glVertex2f(x1, y1*(1.0f-fac) + y2*fac); - glVertex2f(x2, y1*(1.0f-fac) + y2*fac); - glVertex2f(x1*(1.0f-fac) + x2*fac, y1); - glVertex2f(x1*(1.0f-fac) + x2*fac, y2); - fac+= 4.0f*gridstep; + fac = 0.0f; + while (fac < 1.0f) { + glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2); + fac += 4.0f * gridstep; } glEnd(); } @@ -406,11 +406,11 @@ static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, uns static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, float *rectf) { - float *trectf= MEM_mallocN(rectx*recty*4, "temp"); + float *trectf = MEM_mallocN(rectx * recty * 4, "temp"); int a, b; - for (a= rectx*recty -1, b= 4*a+3; a>=0; a--, b-=4) - trectf[a]= rectf[b]; + for (a = rectx * recty - 1, b = 4 * a + 3; a >= 0; a--, b -= 4) + trectf[a] = rectf[b]; glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_FLOAT, trectf); MEM_freeN(trectf); @@ -449,26 +449,26 @@ static void sima_draw_zbuffloat_pixels(Scene *scene, float x1, float y1, int rec float bias, scale, *rectf, clipend; int a; - if (scene->camera && scene->camera->type==OB_CAMERA) { - bias= ((Camera *)scene->camera->data)->clipsta; - clipend= ((Camera *)scene->camera->data)->clipend; - scale= 1.0f/(clipend-bias); + if (scene->camera && scene->camera->type == OB_CAMERA) { + bias = ((Camera *)scene->camera->data)->clipsta; + clipend = ((Camera *)scene->camera->data)->clipend; + scale = 1.0f / (clipend - bias); } else { - bias= 0.1f; - scale= 0.01f; - clipend= 100.0f; + bias = 0.1f; + scale = 0.01f; + clipend = 100.0f; } - rectf= MEM_mallocN(rectx*recty*4, "temp"); - for (a= rectx*recty -1; a>=0; a--) { - if (rect_float[a]>clipend) - rectf[a]= 0.0f; - else if (rect_float[a]<bias) - rectf[a]= 1.0f; + rectf = MEM_mallocN(rectx * recty * 4, "temp"); + for (a = rectx * recty - 1; a >= 0; a--) { + if (rect_float[a] > clipend) + rectf[a] = 0.0f; + else if (rect_float[a] < bias) + rectf[a] = 1.0f; else { - rectf[a]= 1.0f - (rect_float[a]-bias)*scale; - rectf[a]*= rectf[a]; + rectf[a] = 1.0f - (rect_float[a] - bias) * scale; + rectf[a] *= rectf[a]; } } glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_FLOAT, rectf); @@ -491,20 +491,20 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image if (sima->flag & SI_SHOW_ALPHA) { if (ibuf->rect) sima_draw_alpha_pixels(x, y, ibuf->x, ibuf->y, ibuf->rect); - else if (ibuf->rect_float && ibuf->channels==4) + else if (ibuf->rect_float && ibuf->channels == 4) sima_draw_alpha_pixelsf(x, y, ibuf->x, ibuf->y, ibuf->rect_float); } - else if (sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1))) { + else if (sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels == 1))) { if (ibuf->zbuf) sima_draw_zbuf_pixels(x, y, ibuf->x, ibuf->y, ibuf->zbuf); else if (ibuf->zbuf_float) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->zbuf_float); - else if (ibuf->channels==1) + else if (ibuf->channels == 1) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->rect_float); } else { if (sima->flag & SI_USE_ALPHA) { - fdrawcheckerboard(x, y, x + ibuf->x*zoomx, y + ibuf->y*zoomy); + fdrawcheckerboard(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -536,17 +536,17 @@ static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty, /* the right offset in rectot */ - rt= ibuf->rect+ (starty*ibuf->x+ startx); + rt = ibuf->rect + (starty * ibuf->x + startx); - len= (endx-startx); - heigth= (endy-starty); + len = (endx - startx); + heigth = (endy - starty); - rp=rectmain= MEM_mallocN(heigth*len*sizeof(int), "rect"); + rp = rectmain = MEM_mallocN(heigth * len * sizeof(int), "rect"); - for (y=0; y<heigth; y++) { - memcpy(rp, rt, len*4); - rt+= ibuf->x; - rp+= len; + for (y = 0; y < heigth; y++) { + memcpy(rp, rt, len * 4); + rt += ibuf->x; + rp += len; } return rectmain; } @@ -558,28 +558,28 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene, int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT; /* verify valid values, just leave this a while */ - if (ima->xrep<1) return; - if (ima->yrep<1) return; + if (ima->xrep < 1) return; + if (ima->yrep < 1) return; glPixelZoom(zoomx, zoomy); - if (sima->curtile >= ima->xrep*ima->yrep) - sima->curtile = ima->xrep*ima->yrep - 1; + if (sima->curtile >= ima->xrep * ima->yrep) + sima->curtile = ima->xrep * ima->yrep - 1; /* create char buffer from float if needed */ image_verify_buffer_float(ima, ibuf, color_manage); /* retrieve part of image buffer */ - dx= ibuf->x/ima->xrep; - dy= ibuf->y/ima->yrep; - sx= (sima->curtile % ima->xrep)*dx; - sy= (sima->curtile / ima->xrep)*dy; - rect= get_part_from_ibuf(ibuf, sx, sy, sx+dx, sy+dy); + dx = ibuf->x / ima->xrep; + dy = ibuf->y / ima->yrep; + sx = (sima->curtile % ima->xrep) * dx; + sy = (sima->curtile / ima->xrep) * dy; + rect = get_part_from_ibuf(ibuf, sx, sy, sx + dx, sy + dy); /* draw repeated */ - for (sy=0; sy+dy<=ibuf->y; sy+= dy) { - for (sx=0; sx+dx<=ibuf->x; sx+= dx) { - UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx/(float)ibuf->x, fy + (float)sy/(float)ibuf->y, &x, &y); + for (sy = 0; sy + dy <= ibuf->y; sy += dy) { + for (sx = 0; sx + dx <= ibuf->x; sx += dx) { + UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx / (float)ibuf->x, fy + (float)sy / (float)ibuf->y, &x, &y); glaDrawPixelsSafe(x, y, dx, dy, dx, GL_RGBA, GL_UNSIGNED_BYTE, rect); } @@ -592,18 +592,18 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene, static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float zoomx, float zoomy) { - const double time_current= PIL_check_seconds_timer(); + const double time_current = PIL_check_seconds_timer(); - const int xmax= ceil(ar->v2d.cur.xmax); - const int ymax= ceil(ar->v2d.cur.ymax); - const int xmin= floor(ar->v2d.cur.xmin); - const int ymin= floor(ar->v2d.cur.ymin); + const int xmax = ceil(ar->v2d.cur.xmax); + const int ymax = ceil(ar->v2d.cur.ymax); + const int xmin = floor(ar->v2d.cur.xmin); + const int ymin = floor(ar->v2d.cur.ymin); int x; - for (x=xmin; x<xmax; x++) { + for (x = xmin; x < xmax; x++) { int y; - for (y=ymin; y<ymax; y++) { + for (y = ymin; y < ymax; y++) { if (ima && (ima->tpageflag & IMA_TILES)) draw_image_buffer_tiled(sima, ar, scene, ima, ibuf, x, y, zoomx, zoomy); else @@ -624,13 +624,13 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) /* draw in View2D space? */ if (onlyv2d) { /* assume that UI_view2d_ortho(C) has been called... */ - SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C); + SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); /* draw grease-pencil ('image' strokes) */ //if (sima->flag & SI_DISPGP) - draw_gpencil_2dimage(C, ibuf); + draw_gpencil_2dimage(C, ibuf); ED_space_image_release_buffer(sima, lock); } @@ -640,7 +640,7 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) /* draw grease-pencil ('screen' strokes) */ //if (sima->flag & SI_DISPGP) - draw_gpencil_view2d(C, 0); + draw_gpencil_view2d(C, 0); } } @@ -648,24 +648,24 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) #if 0 static void draw_image_view_tool(Scene *scene) { - ToolSettings *settings= scene->toolsettings; - Brush *brush= settings->imapaint.brush; + ToolSettings *settings = scene->toolsettings; + Brush *brush = settings->imapaint.brush; int mval[2]; float radius; - int draw= 0; + int draw = 0; if (brush) { if (settings->imapaint.flag & IMAGEPAINT_DRAWING) { if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL_DRAWING) - draw= 1; + draw = 1; } else if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL) - draw= 1; + draw = 1; if (draw) { getmouseco_areawin(mval); - radius= brush_size(brush)*G.sima->zoom; + radius = brush_size(brush) * G.sima->zoom; fdrawXORcirc(mval[0], mval[1], radius); if (brush->innerradius != 1.0) { @@ -687,24 +687,24 @@ static unsigned char *get_alpha_clone_image(Scene *scene, int *width, int *heigh if (!brush || !brush->clone.image) return NULL; - ibuf= BKE_image_get_ibuf(brush->clone.image, NULL); + ibuf = BKE_image_get_ibuf(brush->clone.image, NULL); if (!ibuf || !ibuf->rect) return NULL; - rect= MEM_dupallocN(ibuf->rect); + rect = MEM_dupallocN(ibuf->rect); if (!rect) return NULL; - *width= ibuf->x; - *height= ibuf->y; + *width = ibuf->x; + *height = ibuf->y; - size= (*width)*(*height); - alpha= (unsigned char)255*brush->clone.alpha; - cp= rect; + size = (*width) * (*height); + alpha = (unsigned char)255 * brush->clone.alpha; + cp = rect; while (size-- > 0) { - cp[3]= alpha; + cp[3] = alpha; cp += 4; } @@ -717,12 +717,12 @@ static void draw_image_paint_helpers(ARegion *ar, Scene *scene, float zoomx, flo int x, y, w, h; unsigned char *clonerect; - brush= paint_brush(&scene->toolsettings->imapaint.paint); + brush = paint_brush(&scene->toolsettings->imapaint.paint); if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) { /* this is not very efficient, but glDrawPixels doesn't allow * drawing with alpha */ - clonerect= get_alpha_clone_image(scene, &w, &h); + clonerect = get_alpha_clone_image(scene, &w, &h); if (clonerect) { UI_view2d_to_region_no_clip(&ar->v2d, brush->clone.offset[0], brush->clone.offset[1], &x, &y); @@ -759,28 +759,28 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) ED_image_aspect(sima->image, &xuser_asp, &yuser_asp); /* UGLY hack? until now iusers worked fine... but for flipbook viewer we need this */ - if (sima->image->type==IMA_TYPE_COMPOSITE) { - ImageUser *iuser= ntree_get_active_iuser(scene->nodetree); + if (sima->image->type == IMA_TYPE_COMPOSITE) { + ImageUser *iuser = ntree_get_active_iuser(scene->nodetree); if (iuser) { BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0); - sima->iuser= *iuser; + sima->iuser = *iuser; } } /* and we check for spare */ - ibuf= ED_space_image_buffer(sima); + ibuf = ED_space_image_buffer(sima); } #endif /* retrieve the image and information about it */ - ima= ED_space_image(sima); + ima = ED_space_image(sima); ED_space_image_zoom(sima, ar, &zoomx, &zoomy); - ibuf= ED_space_image_acquire_buffer(sima, &lock); + ibuf = ED_space_image_acquire_buffer(sima, &lock); - show_viewer= (ima && ima->source == IMA_SRC_VIEWER); - show_render= (show_viewer && ima->type == IMA_TYPE_R_RESULT); + show_viewer = (ima && ima->source == IMA_SRC_VIEWER); + show_render = (show_viewer && ima->type == IMA_TYPE_R_RESULT); /* draw the image or grid */ - if (ibuf==NULL) + if (ibuf == NULL) draw_image_grid(ar, zoomx, zoomy); else if (sima->flag & SI_DRAW_TILE) draw_image_buffer_repeated(sima, ar, scene, ima, ibuf, zoomx, zoomy); @@ -797,12 +797,12 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) /* XXX integrate this code */ #if 0 if (ibuf) { - float xoffs=0.0f, yoffs= 0.0f; + float xoffs = 0.0f, yoffs = 0.0f; if (image_preview_active(sa, &xim, &yim)) { - xoffs= scene->r.disprect.xmin; - yoffs= scene->r.disprect.ymin; - glColor3ub(0,0,0); + xoffs = scene->r.disprect.xmin; + yoffs = scene->r.disprect.ymin; + glColor3ub(0, 0, 0); calc_image_view(sima, 'f'); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); glRectf(0.0f, 0.0f, 1.0f, 1.0f); |