123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- 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<String, dynamic> 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
- }
- }
- };
- }
- }
|