FloodTool.cs (pinta-1.7) | : | FloodTool.cs (pinta-1.7.1) | ||
---|---|---|---|---|
skipping to change at line 126 | skipping to change at line 126 | |||
Gdk.Region currentRegion = Gdk.Region.Rectangle (doc.GetS electedBounds (true)); | Gdk.Region currentRegion = Gdk.Region.Rectangle (doc.GetS electedBounds (true)); | |||
// See if the mouse click is valid | // See if the mouse click is valid | |||
if (!currentRegion.PointIn (pos.X, pos.Y) && limitToSelec tion) { | if (!currentRegion.PointIn (pos.X, pos.Y) && limitToSelec tion) { | |||
currentRegion.Dispose (); | currentRegion.Dispose (); | |||
currentRegion = null; | currentRegion = null; | |||
return; | return; | |||
} | } | |||
ImageSurface surface = doc.CurrentUserLayer.Surface; | ImageSurface surface = doc.CurrentUserLayer.Surface; | |||
using (var stencil_surface = new ImageSurface (Format.Arg b32, (int)surface.Width, (int)surface.Height)) { | using (var stencil_surface = CairoExtensions.CreateImageS urface (Format.Argb32, (int)surface.Width, (int)surface.Height)) { | |||
IBitVector2D stencilBuffer = new BitVector2DSurfa ceAdapter (stencil_surface); | IBitVector2D stencilBuffer = new BitVector2DSurfa ceAdapter (stencil_surface); | |||
int tol = (int)(Tolerance * Tolerance * 256); | int tol = (int)(Tolerance * Tolerance * 256); | |||
Rectangle boundingBox; | Rectangle boundingBox; | |||
if (IsContinguousMode) | if (IsContinguousMode) | |||
FillStencilFromPoint (surface, stencilBuf fer, pos, tol, out boundingBox, currentRegion, limitToSelection); | FillStencilFromPoint (surface, stencilBuf fer, pos, tol, out boundingBox, currentRegion, limitToSelection); | |||
else | else | |||
FillStencilByColor (surface, stencilBuffe r, surface.GetColorBgraUnchecked (pos.X, pos.Y), tol, out boundingBox, currentRe gion, LimitToSelection); | FillStencilByColor (surface, stencilBuffe r, surface.GetColorBgraUnchecked (pos.X, pos.Y), tol, out boundingBox, currentRe gion, LimitToSelection); | |||
OnFillRegionComputed (stencilBuffer); | OnFillRegionComputed (stencilBuffer); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |