public TemplateModificationResult DefineArea(ITemplatePageArea area) { if (area == null) { return(TemplateModificationResult.Failure(new EmptyInput())); } if (_definedAreas.ContainsKey(area.AreaName)) { //TODO: DuplicatedPageAreaName return(TemplateModificationResult.Failure(null)); } _definedAreas.Add(area.AreaName, area); return(TemplateModificationResult.Success()); }
public FlattenedCroppedArea(ITemplatePageArea areaUsedForCropping, ICollection <OrderedFlattenedBitmap> croppedBitmaps, Guid documentId) { if (croppedBitmaps == null || croppedBitmaps.Count == 0) { throw new ArgumentNullException(nameof(croppedBitmaps)); } if (documentId == Guid.Empty) { throw new ArgumentNullException(nameof(documentId)); } AreaUsedForCropping = areaUsedForCropping ?? throw new ArgumentNullException(nameof(areaUsedForCropping)); FlattenedBitmaps = croppedBitmaps; DocumentId = documentId; }
public CroppedArea(ITemplatePageArea areaUsed, IReadOnlyCollection <OrderedBitmap> croppedParts, Guid documentId) { if (areaUsed == null) { throw new ArgumentNullException(nameof(areaUsed)); } if (croppedParts == null) { throw new ArgumentNullException(nameof(croppedParts)); } if (documentId == Guid.Empty) { throw new ArgumentNullException(nameof(documentId)); } AreaUsedForCropping = areaUsed; CroppedParts = croppedParts; DocumentId = documentId; }