diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html index 859bf9fe7..eb02b8739 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html @@ -51,6 +51,38 @@ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+
diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.scss index 7ec4b7bc0..aa79d5ba1 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.scss @@ -1,5 +1,3 @@ -@use 'variables'; - :host { display: flex; flex-direction: row !important; @@ -92,4 +90,47 @@ } } } + + .alignment-buttons { + width: 99px; + height: 25px; + display: flex; + justify-content: space-between; + border-radius: 6px; + border: 1px solid var(--iqser-grey-5); + margin-right: 10px; + + .alignment { + width: 33px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + + mat-icon { + width: 14px; + } + + &.active { + background-color: var(--iqser-primary); + cursor: default; + } + + &.horizontal-left, + &.vertical-top { + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + } + + &.horizontal-right, + &.vertical-bottom { + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + } + } + + .alignment:not(.active):hover { + background: var(--iqser-btn-bg-hover); + } + } } diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts index d31c83a07..829937035 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts @@ -13,8 +13,21 @@ import { LoadingService, TenantsService, Toaster, + trackByFactory, } from '@iqser/common-ui'; -import { DOSSIER_TEMPLATE_ID, type IWatermark, type User, WATERMARK_ID, WatermarkOrientation, WatermarkOrientations } from '@red/domain'; +import { + DOSSIER_TEMPLATE_ID, + type IWatermark, + type User, + WATERMARK_HORIZONTAL_ALIGNMENTS, + WATERMARK_ID, + WATERMARK_VERTICAL_ALIGNMENTS, + WatermarkAlignment, + WatermarkHorizontalAlignment, + WatermarkOrientation, + WatermarkOrientations, + WatermarkVerticalAlignment, +} from '@red/domain'; import { stampPDFPage } from '@utils/page-stamper'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { WatermarkService } from '@services/entity-services/watermark.service'; @@ -26,6 +39,7 @@ import { WatermarksMapService } from '@services/entity-services/watermarks-map.s import { ROLES } from '@users/roles'; import { environment } from '@environments/environment'; import { tap } from 'rxjs/operators'; +import { watermarkTranslations } from '@translations/watermark-translations'; export const DEFAULT_WATERMARK: Partial = { text: 'Watermark', @@ -35,6 +49,8 @@ export const DEFAULT_WATERMARK: Partial = { fontSize: 40, fontType: 'helvetica', orientation: WatermarkOrientations.HORIZONTAL, + horizontalTextAlignment: WATERMARK_HORIZONTAL_ALIGNMENTS.CENTER, + verticalTextAlignment: WATERMARK_VERTICAL_ALIGNMENTS.CENTER, } as const; interface WatermarkForm { @@ -45,6 +61,8 @@ interface WatermarkForm { fontSize: number; fontType: string; orientation: WatermarkOrientation; + horizontalTextAlignment: WatermarkHorizontalAlignment; + verticalTextAlignment: WatermarkVerticalAlignment; } @Component({ @@ -53,6 +71,8 @@ interface WatermarkForm { }) export class WatermarkScreenComponent implements OnInit { readonly iconButtonTypes = IconButtonTypes; + readonly translations = watermarkTranslations; + readonly trackBy = trackByFactory(); readonly currentUser = getCurrentUser(); readonly form = this.#form; readonly watermark$: Observable>; @@ -70,6 +90,9 @@ export class WatermarkScreenComponent implements OnInit { readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID); readonly #watermarkId = Number(getParam(WATERMARK_ID)); #watermark: Partial = {}; + readonly watermarkHorizontalAlignments = Object.values(WATERMARK_HORIZONTAL_ALIGNMENTS); + readonly watermarkVerticalAlignments = Object.values(WATERMARK_VERTICAL_ALIGNMENTS); + currentAlignment: WatermarkAlignment; constructor( private readonly _http: HttpClient, @@ -116,6 +139,8 @@ export class WatermarkScreenComponent implements OnInit { fontSize: [null], fontType: [null], orientation: [null], + horizontalTextAlignment: [null], + verticalTextAlignment: [null], }); if (!this.currentUser.isAdmin || !this.permissionsService.has(ROLES.watermarks.write)) { @@ -179,9 +204,25 @@ export class WatermarkScreenComponent implements OnInit { this.instance.Core.documentViewer.displayPageLocation($event, 0, 0); } + async alignHorizontally(alignment: WatermarkHorizontalAlignment) { + this.form.controls['horizontalTextAlignment'].setValue(alignment); + this.currentAlignment.horizontal = alignment; + await this.configChanged(); + } + + async alignVertically(alignment: WatermarkVerticalAlignment) { + this.form.controls['verticalTextAlignment'].setValue(alignment); + this.currentAlignment.vertical = alignment; + await this.configChanged(); + } + async #initForm(watermark: Partial) { this.#watermark = { ...watermark, dossierTemplateId: this.#dossierTemplateId }; this.form.patchValue({ ...watermark }); + this.currentAlignment = { + horizontal: this.#watermark.horizontalTextAlignment, + vertical: this.#watermark.verticalTextAlignment, + }; } async #loadViewer() { @@ -238,6 +279,8 @@ export class WatermarkScreenComponent implements OnInit { this.form.controls.fontSize.value, this.form.controls.fontType.value, this.form.controls.orientation.value, + this.form.controls.horizontalTextAlignment.value, + this.form.controls.verticalTextAlignment.value, this.form.controls.opacity.value, this.form.controls.hexColor.value, [1, 2], diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark.module.ts b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark.module.ts index 02c8c9e28..9df82e8c9 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark.module.ts +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark.module.ts @@ -26,6 +26,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { MatLegacySliderModule } from '@angular/material/legacy-slider'; import { ColorPickerModule } from 'ngx-color-picker'; import { MatLegacySlideToggleModule } from '@angular/material/legacy-slide-toggle'; +import { MatTooltipModule } from '@angular/material/tooltip'; const routes: IqserRoutes = [ { @@ -73,6 +74,7 @@ const routes: IqserRoutes = [ HasScrollbarDirective, IqserAllowDirective, TenantPipe, + MatTooltipModule, ], }) export class WatermarkModule {} diff --git a/apps/red-ui/src/app/modules/file-preview/services/stamp.service.ts b/apps/red-ui/src/app/modules/file-preview/services/stamp.service.ts index e90abcf28..76f483d3f 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/stamp.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/stamp.service.ts @@ -9,6 +9,7 @@ import { REDDocumentViewer } from '../../pdf-viewer/services/document-viewer.ser import { LicenseService } from '@services/license.service'; import { WatermarksMapService } from '@services/entity-services/watermarks-map.service'; import PDFNet = Core.PDFNet; +import { WATERMARK_HORIZONTAL_ALIGNMENTS, WATERMARK_VERTICAL_ALIGNMENTS } from '@red/domain'; @Injectable() export class StampService { @@ -59,6 +60,8 @@ export class StampService { 17, 'courier', 'TOP_LEFT', + WATERMARK_HORIZONTAL_ALIGNMENTS.CENTER, + WATERMARK_VERTICAL_ALIGNMENTS.CENTER, 50, '#dd4d50', excludedPages, @@ -76,6 +79,8 @@ export class StampService { watermark.fontSize, watermark.fontType, watermark.orientation, + watermark.horizontalTextAlignment, + watermark.verticalTextAlignment, watermark.opacity, watermark.hexColor, Array.from({ length: await document.getPageCount() }, (_x, i) => i + 1), diff --git a/apps/red-ui/src/app/modules/file-preview/utils/compare-mode.utils.ts b/apps/red-ui/src/app/modules/file-preview/utils/compare-mode.utils.ts index 61bdeccda..757bf5703 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/compare-mode.utils.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/compare-mode.utils.ts @@ -1,5 +1,6 @@ import { stampPDFPage } from '../../../utils'; import { Core } from '@pdftron/webviewer'; +import { WATERMARK_HORIZONTAL_ALIGNMENTS, WATERMARK_VERTICAL_ALIGNMENTS } from '@red/domain'; export const processPage = async ( pageNumber: number, @@ -27,6 +28,8 @@ export const processPage = async ( 20, 'courier', 'DIAGONAL', + WATERMARK_HORIZONTAL_ALIGNMENTS.CENTER, + WATERMARK_VERTICAL_ALIGNMENTS.CENTER, 33, '#ffb83b', [await mergedDocument.getPageCount()], diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index 71e2161bc..3d43160b4 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -13,6 +13,12 @@ export class IconsModule { const icons = [ 'ai', 'alert-circle', + 'align-horizontal-center', + 'align-horizontal-left', + 'align-horizontal-right', + 'align-vertical-bottom', + 'align-vertical-center', + 'align-vertical-top', 'approved', 'archive', 'arrow-up', @@ -52,6 +58,8 @@ export class IconsModule { 'needs-work', 'new-tab', 'notification', + 'padding-left-right', + 'padding-top-bottom', 'page', 'preview', 'put-back', diff --git a/apps/red-ui/src/app/translations/watermark-translations.ts b/apps/red-ui/src/app/translations/watermark-translations.ts new file mode 100644 index 000000000..302758942 --- /dev/null +++ b/apps/red-ui/src/app/translations/watermark-translations.ts @@ -0,0 +1,15 @@ +import { WatermarkAlignment, WatermarkHorizontalAlignment, WatermarkVerticalAlignment } from '@red/domain'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +export const watermarkTranslations: Record> = { + HORIZONTAL: { + LEFT: _('watermark-screen.alignment.align-left'), + CENTER: _('watermark-screen.alignment.align-horizontal-centers'), + RIGHT: _('watermark-screen.alignment.align-right'), + }, + VERTICAL: { + TOP: _('watermark-screen.alignment.align-top'), + CENTER: 'watermark-screen.alignment.align-vertical-centers', + BOTTOM: _('watermark-screen.alignment.align-bottom'), + }, +} as const; diff --git a/apps/red-ui/src/app/utils/page-stamper.ts b/apps/red-ui/src/app/utils/page-stamper.ts index 7c428c383..151322500 100644 --- a/apps/red-ui/src/app/utils/page-stamper.ts +++ b/apps/red-ui/src/app/utils/page-stamper.ts @@ -1,6 +1,12 @@ import { hexToRgb } from './functions'; import { Core } from '@pdftron/webviewer'; import PDFDoc = Core.PDFNet.PDFDoc; +import { + WATERMARK_HORIZONTAL_ALIGNMENTS, + WATERMARK_VERTICAL_ALIGNMENTS, + WatermarkHorizontalAlignment, + WatermarkVerticalAlignment, +} from '@red/domain'; async function createPageSet(pdfNet: typeof Core.PDFNet, pages: number[]) { const pageSet = await pdfNet.PageSet.create(); @@ -39,6 +45,8 @@ export async function stampPDFPage( fontSize: number, fontType: string, orientation: 'DIAGONAL' | 'HORIZONTAL' | 'VERTICAL' | 'TOP_LEFT', + horizontalTextAlignment: WatermarkHorizontalAlignment, + verticalTextAlignment: WatermarkVerticalAlignment, opacity: number, color: string, pages: number[], @@ -56,21 +64,50 @@ export async function stampPDFPage( await stamper.setFontColor(await pdfNet.ColorPt.init(r / 255, g / 255, b / 255)); await stamper.setOpacity(opacity / 100); + let horizontalAlignment: number; + let verticalAlignment: number; + + switch (horizontalTextAlignment) { + case WATERMARK_HORIZONTAL_ALIGNMENTS.LEFT: + horizontalAlignment = -1; + break; + case WATERMARK_HORIZONTAL_ALIGNMENTS.CENTER: + horizontalAlignment = 0; + break; + case WATERMARK_HORIZONTAL_ALIGNMENTS.RIGHT: + horizontalAlignment = 1; + break; + } + + switch (verticalTextAlignment) { + case WATERMARK_VERTICAL_ALIGNMENTS.TOP: + verticalAlignment = 1; + break; + case WATERMARK_VERTICAL_ALIGNMENTS.CENTER: + verticalAlignment = 0; + break; + case WATERMARK_VERTICAL_ALIGNMENTS.BOTTOM: + verticalAlignment = -1; + break; + } + + await stamper.setAlignment(horizontalAlignment, verticalAlignment); + switch (orientation) { case 'VERTICAL': - await stamper.setAlignment(0, 0); + // await stamper.setAlignment(-1, 1); await stamper.setRotation(-90); break; case 'HORIZONTAL': break; case 'TOP_LEFT': - await stamper.setAlignment(-1, 1); + // await stamper.setAlignment(-1, 1); await stamper.setRotation(90); await stamper.setPosition(20, 20); break; case 'DIAGONAL': default: - await stamper.setAlignment(0, 0); + // await stamper.setAlignment(0, 0); await stamper.setRotation(-45); } @@ -78,7 +115,7 @@ export async function stampPDFPage( // in case there are japanese characters in the text, we add them to the font const fontWithAllTextChars = await pdfNet.Font.createFromFontDescriptor(document, initialFont, text); await stamper.setFont(fontWithAllTextChars); - await stamper.setTextAlignment(0); + await stamper.setTextAlignment(1); await stamper.stampText(document, text, pageSet); }, licenseKey); } diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 2ba253eae..65ec7428a 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -2257,7 +2257,16 @@ "revert": "Rückgängig machen", "save": "Änderungen speichern" }, + "alignment": { + "align-bottom": "", + "align-horizontal-centers": "", + "align-left": "", + "align-right": "", + "align-top": "", + "align-vertical-centers": "" + }, "form": { + "alignment": "", "color": "Farbe", "color-placeholder": "", "font-size": "Schriftgröße", diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 49293c69e..ba1f2cf55 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -2257,7 +2257,16 @@ "revert": "Revert", "save": "Save Changes" }, + "alignment": { + "align-bottom": "Align bottom", + "align-horizontal-centers": "Align horizontal centers", + "align-left": "Align left", + "align-right": "Align right", + "align-top": "Align top", + "align-vertical-centers": "Align vertical centers" + }, "form": { + "alignment": "Alignment", "color": "Color", "color-placeholder": "#", "font-size": "Font Size", diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index ff01dbc00..a4519b72b 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -2257,7 +2257,16 @@ "revert": "Rückgängig machen", "save": "Änderungen speichern" }, + "alignment": { + "align-bottom": "", + "align-horizontal-centers": "", + "align-left": "", + "align-right": "", + "align-top": "", + "align-vertical-centers": "" + }, "form": { + "alignment": "", "color": "Farbe", "color-placeholder": "", "font-size": "Schriftgröße", diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 57e9a2719..b8a08c335 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -2257,7 +2257,16 @@ "revert": "Revert", "save": "Save Changes" }, + "alignment": { + "align-bottom": "Align bottom", + "align-horizontal-centers": "Align horizontal centers", + "align-left": "Align left", + "align-right": "Align right", + "align-top": "Align top", + "align-vertical-centers": "Align vertical centers" + }, "form": { + "alignment": "Alignment", "color": "Color", "color-placeholder": "#", "font-size": "Font Size", diff --git a/apps/red-ui/src/assets/icons/general/align-horizontal-center.svg b/apps/red-ui/src/assets/icons/general/align-horizontal-center.svg new file mode 100644 index 000000000..394f1f8e7 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-horizontal-center.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/align-horizontal-left.svg b/apps/red-ui/src/assets/icons/general/align-horizontal-left.svg new file mode 100644 index 000000000..1208036c7 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-horizontal-left.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/align-horizontal-right.svg b/apps/red-ui/src/assets/icons/general/align-horizontal-right.svg new file mode 100644 index 000000000..673401d11 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-horizontal-right.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/align-vertical-bottom.svg b/apps/red-ui/src/assets/icons/general/align-vertical-bottom.svg new file mode 100644 index 000000000..5c0aa5a4b --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-vertical-bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/align-vertical-center.svg b/apps/red-ui/src/assets/icons/general/align-vertical-center.svg new file mode 100644 index 000000000..8e65929ff --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-vertical-center.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/align-vertical-top.svg b/apps/red-ui/src/assets/icons/general/align-vertical-top.svg new file mode 100644 index 000000000..9ffdac14c --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/align-vertical-top.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/padding-left-right.svg b/apps/red-ui/src/assets/icons/general/padding-left-right.svg new file mode 100644 index 000000000..68c674250 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/padding-left-right.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/red-ui/src/assets/icons/general/padding-top-bottom.svg b/apps/red-ui/src/assets/icons/general/padding-top-bottom.svg new file mode 100644 index 000000000..37331de99 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/padding-top-bottom.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/libs/red-domain/src/lib/watermarks/watermark.model.ts b/libs/red-domain/src/lib/watermarks/watermark.model.ts index 06b667c03..adb9a11e1 100644 --- a/libs/red-domain/src/lib/watermarks/watermark.model.ts +++ b/libs/red-domain/src/lib/watermarks/watermark.model.ts @@ -1,4 +1,12 @@ -import { IWatermark, WatermarkOrientation } from './watermark'; +import { + IWatermark, + WATERMARK_HORIZONTAL_ALIGNMENTS, + WATERMARK_VERTICAL_ALIGNMENTS, + WatermarkAlignment, + WatermarkHorizontalAlignment, + WatermarkOrientation, + WatermarkVerticalAlignment, +} from './watermark'; import { Entity } from '@iqser/common-ui'; export class Watermark extends Entity { @@ -10,6 +18,8 @@ export class Watermark extends Entity { readonly hexColor: string; readonly opacity: number; readonly orientation: WatermarkOrientation; + readonly horizontalTextAlignment: WatermarkHorizontalAlignment; + readonly verticalTextAlignment: WatermarkVerticalAlignment; readonly text: string; readonly name: string; readonly createdBy?: string; @@ -28,6 +38,8 @@ export class Watermark extends Entity { this.hexColor = watermark.hexColor; this.opacity = watermark.opacity; this.orientation = watermark.orientation; + this.horizontalTextAlignment = watermark.horizontalTextAlignment ?? WATERMARK_HORIZONTAL_ALIGNMENTS.CENTER; + this.verticalTextAlignment = watermark.verticalTextAlignment ?? WATERMARK_VERTICAL_ALIGNMENTS.CENTER; this.text = watermark.text; this.name = watermark.name; this.createdBy = watermark.createdBy; diff --git a/libs/red-domain/src/lib/watermarks/watermark.ts b/libs/red-domain/src/lib/watermarks/watermark.ts index 27270bb51..c7c3fc4eb 100644 --- a/libs/red-domain/src/lib/watermarks/watermark.ts +++ b/libs/red-domain/src/lib/watermarks/watermark.ts @@ -7,6 +7,8 @@ export interface IWatermark { hexColor: string; opacity: number; orientation: WatermarkOrientation; + horizontalTextAlignment: WatermarkHorizontalAlignment; + verticalTextAlignment: WatermarkVerticalAlignment; text: string; name: string; createdBy?: string; @@ -14,9 +16,30 @@ export interface IWatermark { dateModified?: string; } +export const WATERMARK_HORIZONTAL_ALIGNMENTS = { + LEFT: 'LEFT', + CENTER: 'CENTER', + RIGHT: 'RIGHT', +} as const; +export type WatermarkHorizontalAlignmentKey = keyof typeof WATERMARK_HORIZONTAL_ALIGNMENTS; +export type WatermarkHorizontalAlignment = (typeof WATERMARK_HORIZONTAL_ALIGNMENTS)[WatermarkHorizontalAlignmentKey]; + +export const WATERMARK_VERTICAL_ALIGNMENTS = { + TOP: 'TOP', + CENTER: 'CENTER', + BOTTOM: 'BOTTOM', +} as const; +export type WatermarkVerticalAlignmentKey = keyof typeof WATERMARK_VERTICAL_ALIGNMENTS; +export type WatermarkVerticalAlignment = (typeof WATERMARK_VERTICAL_ALIGNMENTS)[WatermarkVerticalAlignmentKey]; + export const WatermarkOrientations = { DIAGONAL: 'DIAGONAL', HORIZONTAL: 'HORIZONTAL', VERTICAL: 'VERTICAL', } as const; export type WatermarkOrientation = keyof typeof WatermarkOrientations; + +export interface WatermarkAlignment { + horizontal: WatermarkHorizontalAlignment; + vertical: WatermarkVerticalAlignment; +}