From 4025cadfd04438c4ba27fdd6bea6de29f223b8be Mon Sep 17 00:00:00 2001 From: Kevin Seidel Date: Wed, 31 Jan 2018 09:03:15 +0100 Subject: Move consts into def --- const.go | 76 ---------------------------------------------------------------- def.go | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 76 deletions(-) delete mode 100644 const.go diff --git a/const.go b/const.go deleted file mode 100644 index 1d8918e..0000000 --- a/const.go +++ /dev/null @@ -1,76 +0,0 @@ -package gofpdf - -// Page orientation -const ( - // PageOrientationPortrait ... - PageOrientationPortrait = "P" - // PageOrientationLandscape ... - PageOrientationLandscape = "L" -) - -// Size Unit -const ( - // UnitPoint ... - UnitPoint = "pt" - // UnitMillimeter ... - UnitMillimeter = "mm" - // UnitCentimeter - UnitCentimeter = "cm" - // UnitInch - UnitInch = "inch" -) - -// Page size -const ( - // PageSizeA3 ... - PageSizeA3 = "A3" - // PageSizeA4 ... - PageSizeA4 = "A4" - // PageSizeA5 ... - PageSizeA5 = "A5" - // PageSizeLetter ... - PageSizeLetter = "Letter" - // PageSizeLegal ... - PageSizeLegal = "Legal" -) - -// Border -const ( - // BorderNone ... - BorderNone = "" - // BorderFull ... - BorderFull = "1" - // BorderLeft ... - BorderLeft = "L" - // BorderTop ... - BorderTop = "T" - // BorderRight ... - BorderRight = "R" - // BorderBottom ... - BorderBottom = "B" -) - -// LineBreak -const ( - LineBreakNone = 0 - LineBreakNormal = 1 - LineBreakBelow = 2 -) - -// Alignment -const ( - // AlignLeft ... - AlignLeft = "L" - // AlignRight ... - AlignRight = "R" - // AlignCenter ... - AlignCenter = "C" - // AlignTop ... - AlignTop = "T" - // AlignBottom ... - AlignBottom = "B" - // AlignMiddle ... - AlignMiddle = "M" - // AlignBaseline ... - AlignBaseline = "B" -) diff --git a/def.go b/def.go index 936ca09..53bd90a 100644 --- a/def.go +++ b/def.go @@ -47,6 +47,71 @@ const ( OrientationLandscape = "landscape" ) +const ( + // UnitPoint represents the size unit point + UnitPoint = "pt" + // UnitMillimeter represents the size unit millimeter + UnitMillimeter = "mm" + // UnitCentimeter represents the size unit centimeter + UnitCentimeter = "cm" + // UnitInch represents the size unit inch + UnitInch = "inch" +) + +const ( + // PageSizeA3 represents DIN/ISO A3 page size + PageSizeA3 = "A3" + // PageSizeA4 represents DIN/ISO A4 page size + PageSizeA4 = "A4" + // PageSizeA5 represents DIN/ISO A5 page size + PageSizeA5 = "A5" + // PageSizeLetter represents US Letter page size + PageSizeLetter = "Letter" + // PageSizeLegal represents US Legal page size + PageSizeLegal = "Legal" +) + +const ( + // BorderNone set no border + BorderNone = "" + // BorderFull sets a full border + BorderFull = "1" + // BorderLeft sets the border on the left side + BorderLeft = "L" + // BorderTop sets the border at the top + BorderTop = "T" + // BorderRight sets the border on the right side + BorderRight = "R" + // BorderBottom sets the border on the bottom + BorderBottom = "B" +) + +const ( + // LineBreakNone disables linebreak + LineBreakNone = 0 + // LineBreakNormal enables normal linebreak + LineBreakNormal = 1 + // LineBreakBelow enables linebreak below + LineBreakBelow = 2 +) + +const ( + // AlignLeft left aligns the cell + AlignLeft = "L" + // AlignRight right aligns the cell + AlignRight = "R" + // AlignCenter centers the cell + AlignCenter = "C" + // AlignTop aligns the cell to the top + AlignTop = "T" + // AlignBottom aligns the cell to the bottom + AlignBottom = "B" + // AlignMiddle aligns the cell to the middle + AlignMiddle = "M" + // AlignBaseline aligns the cell to the baseline + AlignBaseline = "B" +) + type colorMode int const ( -- cgit v1.2.1-24-ge1ad