public override bool DoWork(ITileWorkFeedback feedback) { this.feedback = feedback; bool result; try { D.Sayf(0, "{0} start compositing {1}", new object[] { Clocker.theClock.stamp(), this }); if (!this.NeedThisTile()) { D.Say(10, "Skipping extant file: " + this.outputFilename); result = false; } else { D.Sayf(10, "Compositing {0}", new object[] { this.address }); Size tileSize = new MercatorCoordinateSystem().GetTileSize(); GDIBigLockedImage gDIBigLockedImage = new GDIBigLockedImage(tileSize, "CompositeTileUnit"); D.Say(10, string.Format("Start({0}) sm.count={1}", this.address, this.singleSourceUnits.Count)); foreach (SingleSourceUnit current in this.singleSourceUnits) { current.CompositeImageInto(gDIBigLockedImage); } this.SaveTile(gDIBigLockedImage); result = true; } } catch (NonredundantRenderComplaint complaint) { feedback.PostComplaint(complaint); result = false; } catch (Exception arg) { feedback.PostMessage(string.Format("Exception compositing tile {0}: {1}", this.address, arg)); result = false; } return(result); }
public override bool DoWork(ITileWorkFeedback feedback) { this.feedback = feedback; bool result; try { D.Sayf(0, "{0} start compositing {1}", new object[] { Clocker.theClock.stamp(), this }); if (!this.NeedThisTile()) { D.Say(10, "Skipping extant file: " + this.outputFilename); result = false; } else { D.Sayf(10, "Compositing {0}", new object[] { this.address }); Size tileSize = new MercatorCoordinateSystem().GetTileSize(); GDIBigLockedImage gDIBigLockedImage = new GDIBigLockedImage(tileSize, "CompositeTileUnit"); D.Say(10, string.Format("Start({0}) sm.count={1}", this.address, this.singleSourceUnits.Count)); foreach (SingleSourceUnit current in this.singleSourceUnits) { current.CompositeImageInto(gDIBigLockedImage); } this.SaveTile(gDIBigLockedImage); result = true; } } catch (NonredundantRenderComplaint complaint) { feedback.PostComplaint(complaint); result = false; } catch (Exception arg) { feedback.PostMessage(string.Format("Exception compositing tile {0}: {1}", this.address, arg)); result = false; } return result; }
public override bool DoWork(ITileWorkFeedback feedback) { if (!this.needThisTile()) { return false; } D.Sayf(10, "SingleSourcing {0} {1}", new object[] { this.applier.source.GetSourceMapDisplayName(), this.address }); Present present = this.FetchClippedImage(); if (present is ImageRef) { ImageRef image = (ImageRef)present; feedback.PostImageResult(image, this.applier.layer, this.applier.source.GetSourceMapDisplayName(), this.address); } present.Dispose(); return true; }
public override bool DoWork(ITileWorkFeedback feedback) { if (!this.needThisTile()) { return(false); } D.Sayf(10, "SingleSourcing {0} {1}", new object[] { this.applier.source.GetSourceMapDisplayName(), this.address }); Present present = this.FetchClippedImage(); if (present is ImageRef) { ImageRef image = (ImageRef)present; feedback.PostImageResult(image, this.applier.layer, this.applier.source.GetSourceMapDisplayName(), this.address); } present.Dispose(); return(true); }
public abstract bool DoWork(ITileWorkFeedback feedback);