On Fri, Aug 07, 2009 at 11:48:53AM -0500, Udi Fuchs wrote: > I just doubled the grid lines making one dark and the other light.
Good idea, it looks good. I noticed an artifact (present in my original patch as well). The border of the crop area, since it is exactly on the modulus, has an extra pixel greyed out. This is particularly noticeable when enlarging a crop box. The attached patch stops the lines 2 pixels before the border. It leaves a gap, but it also omits the extraneous lines that make exact crops harder. > It would also be nice to update the grid lines while changing the crop. With blinking highlights on, it's manageable, but with them off these lines are near unuseable. Yuck. Where would I need to modify to have these updated for that? -- Bruce Guenter <[email protected]> http://untroubled.org/
diff --git a/ufraw_preview.c b/ufraw_preview.c
index 81f761f..7992f08 100644
--- a/ufraw_preview.c
+++ b/ufraw_preview.c
@@ -652,23 +652,26 @@ static void preview_draw_img_area(preview_data *data,
ufraw_image_data *img,
else if ( yy<CropY1 || yy>=CropY2 || xx<CropX1 || xx>=CropX2 ) {
for (c=0; c<3; c++) p8[c] = p8[c]/4;
}
- /* Shade out the thirds lines */
else if (data->RenderMode==render_default) {
+ /* Shade out the alignment lines */
if ( CFG->drawLines &&
- ( (yy!=0 && (yy-CropY1)%LineDeltaY == 0) ||
- (xx!=0 && (xx-CropX1)%LineDeltaX == 0) ) ) {
- p8[0] /= 2;
- p8[1] /= 2;
- p8[2] /= 2;
- }
- if ( CFG->drawLines &&
- ( (yy!=1 && (yy-CropY1)%LineDeltaY == 1) ||
- (xx!=1 && (xx-CropX1)%LineDeltaX == 1) ) ) {
- p8[0] = 255 - (255-p8[0])/2;
- p8[1] = 255 - (255-p8[1])/2;
- p8[2] = 255 - (255-p8[2])/2;
+ yy > CropY1 + 1 && yy < CropY2 - 2 &&
+ xx > CropX1 + 1 && xx < CropX2 - 2 ) {
+ int dx = (xx - CropX1) % LineDeltaX;
+ int dy = (yy - CropY1) % LineDeltaY;
+ if (dx == 0 || dy == 0) {
+ p8[0] /= 2;
+ p8[1] /= 2;
+ p8[2] /= 2;
+ }
+ else if (dx == 1 || dy == 1) {
+ p8[0] = 255 - (255-p8[0])/2;
+ p8[1] = 255 - (255-p8[1])/2;
+ p8[2] = 255 - (255-p8[2])/2;
+ }
}
- else if ( blinkOver && (p8[0]==255 || p8[1]==255 || p8[2]==255)
)
+ /* Blink the overexposed/underexposed spots */
+ if ( blinkOver && (p8[0]==255 || p8[1]==255 || p8[2]==255) )
p8[0] = p8[1] = p8[2] = 0;
else if ( blinkUnder && (p8[0]==0 || p8[1]==0 || p8[2]==0) )
p8[0] = p8[1] = p8[2] = 255;
pgpOvoofNwbPC.pgp
Description: PGP signature
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ ufraw-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ufraw-devel
