dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Postscript .cvsignore,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Postscript .cvsignore, NONE, 1.1 Makefile.am, NONE, 1.1 PostscriptDriver.cs, NONE, 1.1 PostscriptGraphics.cs, NONE, 1.1 PostscriptPrintSession.cs, NONE, 1.1 PostscriptToolkit.cs, NONE, 1.1 System.Drawing.Postscript.build, NONE, 1.1
Date: Fri, 18 Jul 2003 01:17:58 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Postscript
In directory subversions:/tmp/cvs-serv23587/System.Drawing.Postscript

Added Files:
        .cvsignore Makefile.am PostscriptDriver.cs 
        PostscriptGraphics.cs PostscriptPrintSession.cs 
        PostscriptToolkit.cs System.Drawing.Postscript.build 
Log Message:


Add the skeleton of the postscript printer driver to the tree.


--- NEW FILE ---
Makefile
Makefile.in
.deps
*.dll

--- NEW FILE ---

.PHONY: System.Drawing.Postscript.dll

all-local: System.Drawing.Postscript.dll

System.Drawing.Postscript.dll:
        "$(CSANT)" $(CSANT_FLAGS) -f System.Drawing.Postscript.build all

CLEANFILES = System.Drawing.Postscript.dll

pnetassembliesdir = $(libdir)/cscc/lib
pnetassemblies_DATA = System.Drawing.Postscript.dll

--- NEW FILE ---
/*
 * PostscriptDriver.cs - Implementation of the
 *                      "System.Drawing.Toolkit.PostscriptDriver" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Drawing.Toolkit
{

using System.Drawing.Printing;
using System.Drawing.Toolkit;

public sealed class PostscriptDriver
{
        // Create a graphics object for performing text measurement.
        public static IToolkitGraphics CreateMeasurementGraphics
                                (String printerName)
                        {
                                // TODO
                                return null;
                        }

        // Create a print session object for a particular document.
        public static IToolkitPrintSession GetSession
                                (String printerName, PrintDocument document)
                        {
                                return new PostscriptPrintSession(printerName, 
document);
                        }

}; // class PostscriptDriver

}; // namespace System.Drawing.Postscript

--- NEW FILE ---
/*
 * PostscriptGraphics.cs - Implementation of the
 *                      "System.Drawing.Toolkit.PostscriptGraphics" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Drawing.Toolkit
{

using System.Drawing;
using System.Drawing.Text;
using System.Drawing.Drawing2D;

internal class PostscriptGraphics : ToolkitGraphicsBase
{
        // Constructor.
        public PostscriptGraphics(IToolkit toolkit) : base(toolkit) {}

        // Get or set the graphics object's properties.
        public override float DpiX
                        {
                                get
                                {
                                        return 300.0f;
                                }
                        }
        public override float DpiY
                        {
                                get
                                {
                                        return 300.0f;
                                }
                        }

        // Clear the entire drawing surface.
        public override void Clear(Color color)
                        {
                                // We assume that the page is already "clear" 
when
                                // we start drawing it, so nothing to do here.
                        }

        // Draw a line between two points using the current pen.
        public override void DrawLine(int x1, int y1, int x2, int y2)
                        {
                                // TODO
                        }

        // Draw a set of connected line seguments using the current pen.
        public override void DrawLines(Point[] points)
                        {
                                // TODO
                        }

        // Draw a polygon using the current pen.
        public override void DrawPolygon(Point[] points)
                        {
                                // TODO
                        }

        // Fill a polygon using the current brush.
        public override void FillPolygon(Point[] points, FillMode fillMode)
                        {
                                // TODO
                        }

        // Draw an arc within a rectangle defined by four points.
        public override void DrawArc
                                (Point[] rect, float startAngle, float 
sweepAngle)
                        {
                                // TODO
                        }

        // Draw a pie slice within a rectangle defined by four points.
        public override void DrawPie
                                (Point[] rect, float startAngle, float 
sweepAngle)
                        {
                                // TODO
                        }

        // Fill a pie slice within a rectangle defined by four points.
        public override void FillPie
                                (Point[] rect, float startAngle, float 
sweepAngle)
                        {
                                // TODO
                        }

        // Draw a string using the current font and brush.
        public override void DrawString
                                (String s, int x, int y, StringFormat format)
                        {
                                // TODO
                        }

        // Draw a string using the current font and brush within a
        // layout rectangle that is defined by four points.
        public override void DrawString
                                (String s, Point[] layoutRectangle, 
StringFormat format)
                        {
                                // TODO
                        }

        // Measure a string using the current font and a given layout rectangle.
        public override Size MeasureString
                                (String s, Point[] layoutRectangle,
                                 StringFormat format, out int charactersFitted,
                                 out int linesFilled, bool ascentOnly)
                        {
                                // TODO
                                return new Size(0, 0);
                        }

        // Set the clipping region to empty.
        public override void SetClipEmpty()
                        {
                                // TODO
                        }

        // Set the clipping region to infinite (i.e. disable clipping).
        public override void SetClipInfinite()
                        {
                                // TODO
                        }

        // Set the clipping region to a single rectangle.
        public override void SetClipRect(int x, int y, int width, int height)
                        {
                                // TODO
                        }

        // Set the clipping region to a list of rectangles.
        public override void SetClipRects(Rectangle[] rects)
                        {
                                // TODO
                        }

        // Set the clipping region to a complex mask.
        public override void SetClipMask(Object mask, int topx, int topy)
                        {
                                // TODO
                        }

        // Get the line spacing for the font selected into this graphics object.
        public override int GetLineSpacing()
                        {
                                // TODO
                                return 0;
                        }

}; // class PostscriptGraphics

}; // namespace System.Drawing.Toolkit

--- NEW FILE ---
/*
 * PostscriptPrintSession.cs - Implementation of the
 *                      "System.Drawing.Toolkit.PostscriptPrintSession" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Drawing.Toolkit
{

using System.Drawing.Printing;

internal sealed class PostscriptPrintSession : IToolkitPrintSession
{
        // Internal state.
        private String printerName;
        private PrintDocument document;

        // Constructor.
        public PostscriptPrintSession(String printerName, PrintDocument 
document)
                        {
                                this.printerName = printerName;
                                this.document = document;
                        }

        // Get or set the document that is associated with this session.
        public PrintDocument Document
                        {
                                get
                                {
                                        return document;
                                }
                                set
                                {
                                        document = value;
                                }
                        }

        // Start the printing session.
        public void StartPrint(PrintEventArgs e)
                        {
                                // TODO
                        }

        // End the printing session.
        public void EndPrint(PrintEventArgs e)
                        {
                                // TODO
                        }

        // Start printing a page, and return a "Graphics" object for it.
        public Graphics StartPage(PrintPageEventArgs e)
                        {
                                // TODO
                                return null;
                        }

        // End printing of the current page.
        public void EndPage(PrintPageEventArgs e)
                        {
                                // TODO
                        }

        // Get the preview page information for all pages.  This is only
        // used for preview sessions.  Normal printers should return null.
        public PreviewPageInfo[] GetPreviewPageInfo()
                        {
                                // Not used.
                                return null;
                        }

        // Get or set the anti-alias flag for preview operations.
        public bool UseAntiAlias
                        {
                                get
                                {
                                        // Not used.
                                        return false;
                                }
                                set
                                {
                                        // Not used.
                                }
                        }

}; // class PostscriptPrintSession

}; // namespace System.Drawing.Postscript

--- NEW FILE ---
/*
 * PostscriptToolkit.cs - Implementation of the
 *                      "System.Drawing.Toolkit.PostscriptToolkit" class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace System.Drawing.Toolkit
{

using System.Drawing.Printing;

internal sealed class PostscriptToolkit : NullToolkit
{
        // TODO: handle pens, brushes, etc

}; // class PostscriptToolkit

}; // namespace System.Drawing.Postscript

--- NEW FILE ---
<?xml version="1.0"?>
<project name="pnetlib System.Drawing.Postscript" default="all">
        <target name="all">

                <!-- Build the primary System.Drawing.Postscript.dll library -->
                <compile output="System.Drawing.Postscript.dll"
                                 target="library"
                                 unsafe="true"
                                 nostdlib="true"
                                 debug="${CONFIG_DEBUG_LINES}"
                                 optimize="true">

                        <sources>
                                <includes name="**/*.cs"/>
                        </sources>

                        <references>
                                <file 
name="../System.Drawing/System.Drawing.dll"/>
                                <file name="../System/first/System.dll"/>
                                <file name="../DotGNU.SSL/DotGNU.SSL.dll"/>
                                <file 
name="../DotGNU.Images/DotGNU.Images.dll"/>
                                <file name="../runtime/mscorlib.dll"/>
                        </references>

                        <arg compiler="cscc" value="-Wno-empty-input"/>
                        <arg compiler="cscc" value="-fminimize-parameters"/>
                        <arg compiler="cscc" value="-flatin1-charset"/>
                        <arg compiler="csc" value="/nowarn:626"/>
                        <arg compiler="csc" value="/nowarn:649"/>
                        <arg compiler="csc" value="/nowarn:168"/>
                        <arg compiler="csc" value="/nowarn:67"/>
                        <arg compiler="csc" value="/nowarn:169"/>
                        <arg compiler="csc" value="/nowarn:679"/>
                </compile>

        </target>
</project>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]