import 'dart:ui'; import 'package:compdfkit_flutter/common/util/cpdf_color_extension.dart'; import 'package:flutter/material.dart'; import 'core/annotation/cpdf_border_style.dart'; import 'core/annotation/cpdf_font_type.dart'; import 'core/annotation/cpdf_line_type.dart'; /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved. /// /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. /// This notice may not be removed from this file. class CPDFConfiguration { bool isVerticalMode = true; bool isDoublePage = false; bool isContinueMode = true; bool isCoverPageMode = false; bool isCropMode = false; Color readBackgroundColor = Colors.white; Map toConfiguration(){ return { 'setVerticalMode': isVerticalMode, 'setDoublePage': isDoublePage, 'setContinueMode': isContinueMode, 'setCoverPageMode': isCoverPageMode, 'setCropMode': isCropMode, 'setReadBackgroundColor': readBackgroundColor.toHex(), 'annotAttribute': { 'note': { 'color': "#A5D6A7" }, 'highlight': { 'color': "#A5D6A7", 'opacity': 255 }, 'strikeout': { 'color': "#A5D6A7", 'opacity': 255 }, 'underline': { 'color': "#A5D6A7", 'opacity': 255 }, 'squiggly': { 'color': "#A5D6A7", 'opacity': 255 }, 'ink': { 'color': "#A5D6A7", 'opacity': 255, 'borderWidth': 10, 'eraserWidth' : 10 }, 'square' : { 'lineColor' : "#A5D6A7", 'lineColorOpacity' : 255, 'fillColor' : Colors.transparent.toHex(), 'fillColorOpacity' : 0, 'borderWidth' : 10, 'borderStyle' : { 'style' : CPDFBorderStyle.solid, 'borderWidth' : 10, 'dashArr' : [8.0, 0] } }, 'circle' : { 'lineColor' : "#A5D6A7", 'lineColorOpacity' : 255, 'fillColor' : Colors.transparent.toHex(), 'fillColorOpacity' : 0, 'borderWidth' : 10, 'borderStyle' : { 'style' : CPDFBorderStyle.solid, 'borderWidth' : 10, 'dashArr' : [8.0, 0] } }, 'line' : { 'lineColor' : "#A5D6A7", 'lineColorOpacity' : 255, 'fillColor' : Colors.transparent.toHex(), 'fillColorOpacity' : 0, 'borderWidth' : 10, 'borderStyle' : { 'style' : CPDFBorderStyle.solid, 'borderWidth' : 10, 'dashArr' : [8.0, 0] }, }, 'arrow' : { 'lineColor' : "#A5D6A7", 'lineColorOpacity' : 255, 'fillColor' : Colors.transparent.toHex(), 'fillColorOpacity' : 0, 'borderWidth' : 10, 'borderStyle' : { 'style' : CPDFBorderStyle.solid, 'borderWidth' : 10, 'dashArr' : [8.0, 0] }, 'headType' : CPDFLineType.none, 'tailType' : CPDFLineType.arrow }, 'freetext': { 'textColor' : '#A5D6A7', 'textColorOpacity' : 255, 'fontBold': false, 'fontItalic': false, 'fontSize': 40, 'fontType': CPDFFontType.helvetica } } }; } }