PurplePen.MapDisplay.SetPrintArea C# (CSharp) Method

SetPrintArea() public method

public SetPrintArea ( RectangleF printArea ) : void
printArea System.Drawing.RectangleF
return void
        public void SetPrintArea(RectangleF? printArea)
        {
            if (!this.printArea.Equals(printArea)) {
                this.printArea = printArea;
                RaiseChanged(null);
            }
        }

Usage Example

Example #1
0
        // Create a single PDF file
        void CreateOneBitmap(string fileName, CourseDesignator courseDesignator)
        {
            RectangleF mapRectangle = controller.GetCurrentPrintAreaRectangle(courseDesignator);

            // Get the course view for the course we are printing.
            CourseView courseView = CourseView.CreatePrintingCourseView(eventDB, courseDesignator);

            // Get the correct purple color to print the course in.
            short ocadId;
            float purpleC, purpleM, purpleY, purpleK;
            bool  purpleOverprint;

            FindPurple.GetPurpleColor(mapDisplay, appearance, out ocadId, out purpleC, out purpleM, out purpleY, out purpleK, out purpleOverprint);

            // Create a course layout from the view.
            CourseLayout layout = new CourseLayout();

            layout.SetLayerColor(CourseLayer.Descriptions, NormalCourseAppearance.blackColorOcadId, NormalCourseAppearance.blackColorName, NormalCourseAppearance.blackColorC, NormalCourseAppearance.blackColorM, NormalCourseAppearance.blackColorY, NormalCourseAppearance.blackColorK, false);
            layout.SetLayerColor(CourseLayer.MainCourse, ocadId, NormalCourseAppearance.courseColorName, purpleC, purpleM, purpleY, purpleK, purpleOverprint);
            CourseFormatter.FormatCourseToLayout(symbolDB, courseView, appearance, layout, CourseLayer.MainCourse);

            // Set the course layout into the map display
            mapDisplay.SetCourse(layout);
            mapDisplay.SetPrintArea(null);

            ExportBitmap exportBitmap = new ExportBitmap(mapDisplay);

            exportBitmap.CreateBitmap(fileName, mapRectangle, GetImageFormat(), bitmapCreationSettings.Dpi,
                                      bitmapCreationSettings.WorldFile ? mapDisplay.CoordinateMapper : null);
        }
All Usage Examples Of PurplePen.MapDisplay::SetPrintArea