diff --git a/applications/iconeditor/main.lfm b/applications/iconeditor/main.lfm index b8eed2ad3..f1298f817 100644 --- a/applications/iconeditor/main.lfm +++ b/applications/iconeditor/main.lfm @@ -4014,7 +4014,7 @@ object MainForm: TMainForm end object SavePictureDialog: TSavePictureDialog Title = 'Save file as' - DefaultExt = '.xpm' + DefaultExt = '.bmp' Filter = 'Graphic (*.png; *.xpm; *.bmp)|*.png; *.xpm; *.bmp|Pixmap (*.xpm)|*.xpm|Bitmap (*.bmp)|*.bmp|Portable Network Graphic (*.png)|*.png' FilterIndex = 0 Options = [ofOverwritePrompt, ofEnableSizing, ofViewDetail, ofAutoPreview] diff --git a/applications/iconeditor/main.lrs b/applications/iconeditor/main.lrs index a585a0749..69754ac75 100644 --- a/applications/iconeditor/main.lrs +++ b/applications/iconeditor/main.lrs @@ -4038,7 +4038,7 @@ LazarusResources.Add('TMainForm','FORMDATA',[ +'0'#6#13'ColorP=FFFFFF'#6#13'ColorQ=C0DCC0'#6#13'ColorR=F0CAA6'#6#13'ColorS=' +'F0FBFF'#6#13'ColorT=A4A0A0'#0#4'left'#3#186#0#3'top'#2'Z'#0#0#18'TSavePictu' +'reDialog'#17'SavePictureDialog'#5'Title'#6#12'Save file as'#10'DefaultExt'#6 - +#4'.xpm'#6'Filter'#6#130'Graphic (*.png; *.xpm; *.bmp)|*.png; *.xpm; *.bmp|P' + +#4'.bmp'#6'Filter'#6#130'Graphic (*.png; *.xpm; *.bmp)|*.png; *.xpm; *.bmp|P' +'ixmap (*.xpm)|*.xpm|Bitmap (*.bmp)|*.bmp|Portable Network Graphic (*.png)|*' +'.png'#11'FilterIndex'#2#0#7'Options'#11#17'ofOverwritePrompt'#14'ofEnableSi' +'zing'#12'ofViewDetail'#13'ofAutoPreview'#0#4'left'#3#150#0#3'top'#2'~'#0#0 diff --git a/components/rgbgraphics/rgbgraphics.pas b/components/rgbgraphics/rgbgraphics.pas index daf24eb59..b1042d29f 100644 --- a/components/rgbgraphics/rgbgraphics.pas +++ b/components/rgbgraphics/rgbgraphics.pas @@ -810,13 +810,22 @@ end; procedure TRGB32Canvas.FuzzyRectangle(X1, Y1, X2, Y2: Integer); var X, Y: LongInt; - delta: Integer; + deltaX, deltaY: Integer; begin - for Y := Y1 + 5 to Y2 - 5 do - for X := X1 + 5 to X2 - 5 do + for Y := Y1 to Y2 do + for X := X1 to X2 do begin - delta := X mod 5; - SetColor(X, Y, GetColor(X - delta, Y - delta)); + // This computation has a good effect of making text illegible, + // but keeping the overal image with the same colors + deltaX := X mod 5; + deltaY := deltaX; + + // Makes sure we won't get any invalid pixel positions + if X < 5 then deltaX := -deltaX; + if Y < 5 then deltaY := -deltaY; + + // Change the color + SetColor(X, Y, GetColor(X - deltaX, Y - deltaY)); end; end;