Esempio n. 1
0
        private static Element BuildColorStripElement(Layout layout)
        {
            var sheetHeightPoints = layout.SheetHeight;
            // carefully handpicked values. adjusted to look good after Xpresso does its magic (size must be 180x10 mm).
            var stripWidthPoints  = 79.0f;
            var stripHeightPoints = 531.0f;

            var stripCenterYPoints = sheetHeightPoints / 2.0f;
            var stripBottomPoint   = stripCenterYPoints - stripHeightPoints / 2.0f;

            return(new Element
            {
                //Type = ElementType.MeasureColorStrip,
                //Resource = new ElementResource
                //{
                //    Name = "Pressview MeasureColor Strip",
                //    FileName = "ColorStrip.pdf"
                //},
                //Left = 0,
                //Bottom = stripBottomPoint,
                //Height = stripHeightPoints,
                //Width = stripWidthPoints,
                Rotate = 0
            });
        }
Esempio n. 2
0
        public static Layout BuildPap720(int papCode, XpressoModel xjf)
        {
            var separator = new[] { ' ' };
            // todo: check if we can always assume Points as size units
            var sheetWidthPoints  = float.Parse(xjf.Jobs[0].Layout[0].Size.Split(separator)[0]);
            var sheetHeightPoints = float.Parse(xjf.Jobs[0].Layout[0].Size.Split(separator)[1]);
            var layout            = new Layout
            {
                PapCode     = papCode,
                SheetHeight = sheetHeightPoints,
                SheetWidth  = sheetWidthPoints,
                Tiles       = GenerateTiles()
            };

            return(layout);
        }