From 985b19482a54b422475e9f47cb441dbef828d5d5 Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Wed, 29 Mar 2000 15:53:29 +0000 Subject: [PATCH] Added nsRenderingContextImpl to Mozilla.. Windows now uses this Implementation.. other platforms to follow. r=kmclusk --- gfx/src/makefile.win | 1 + gfx/src/nsRenderingContextImpl.cpp | 38 +++++++++++++++++++++++ gfx/src/shared/nsRenderingContextImpl.cpp | 38 +++++++++++++++++++++++ gfx/src/windows/nsRenderingContextWin.h | 5 +-- 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 gfx/src/nsRenderingContextImpl.cpp create mode 100644 gfx/src/shared/nsRenderingContextImpl.cpp diff --git a/gfx/src/makefile.win b/gfx/src/makefile.win index 736934e0239d..31bfc9676e2a 100644 --- a/gfx/src/makefile.win +++ b/gfx/src/makefile.win @@ -53,6 +53,7 @@ CPP_OBJS=.\$(OBJDIR)\nsColor.obj .\$(OBJDIR)\nsColorNames.obj \ .\$(OBJDIR)\nsDeviceContext.obj \ .\$(OBJDIR)\nsImageNetContextSync.obj \ .\$(OBJDIR)\nsBlender.obj \ + .\$(OBJDIR)\nsRenderingContextImpl.obj\ .\$(OBJDIR)\nsScriptableRegion.obj LINCS=-I$(PUBLIC)\util -I$(PUBLIC)\img \ diff --git a/gfx/src/nsRenderingContextImpl.cpp b/gfx/src/nsRenderingContextImpl.cpp new file mode 100644 index 000000000000..09872538381d --- /dev/null +++ b/gfx/src/nsRenderingContextImpl.cpp @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +#include "nsRenderingContextImpl.h" + + +nsRenderingContextImpl :: nsRenderingContextImpl() +{ + + +} + +nsRenderingContextImpl :: ~nsRenderingContextImpl() +{ + + +} + + diff --git a/gfx/src/shared/nsRenderingContextImpl.cpp b/gfx/src/shared/nsRenderingContextImpl.cpp new file mode 100644 index 000000000000..09872538381d --- /dev/null +++ b/gfx/src/shared/nsRenderingContextImpl.cpp @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +#include "nsRenderingContextImpl.h" + + +nsRenderingContextImpl :: nsRenderingContextImpl() +{ + + +} + +nsRenderingContextImpl :: ~nsRenderingContextImpl() +{ + + +} + + diff --git a/gfx/src/windows/nsRenderingContextWin.h b/gfx/src/windows/nsRenderingContextWin.h index e52bea4ee90a..8ff5e48b8aa4 100644 --- a/gfx/src/windows/nsRenderingContextWin.h +++ b/gfx/src/windows/nsRenderingContextWin.h @@ -35,11 +35,12 @@ #include "nsVoidArray.h" #include "nsIRenderingContextWin.h" #include "nsDrawingSurfaceWin.h" +#include "nsRenderingContextImpl.h" class GraphicsState; class nsDrawingSurfaceWin; -class nsRenderingContextWin : public nsIRenderingContext, +class nsRenderingContextWin : public nsRenderingContextImpl, nsIRenderingContextWin { public: @@ -178,9 +179,9 @@ public: protected: void SetupFontAndColor(void); -private: ~nsRenderingContextWin(); +private: // ConditionRect is used to fix a coordinate overflow problem under WIN95. void ConditionRect(nsRect aSrcRect, RECT& aDestRect);