michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_PATH_H michael@0: #define GFX_PATH_H michael@0: michael@0: #include "gfxTypes.h" michael@0: #include "nsISupportsImpl.h" michael@0: #include "mozilla/RefPtr.h" michael@0: michael@0: class gfxContext; michael@0: typedef struct cairo_path cairo_path_t; michael@0: michael@0: namespace mozilla { michael@0: namespace gfx { michael@0: class Path; michael@0: } michael@0: } michael@0: michael@0: /** michael@0: * Class representing a path. Can be created by copying the current path michael@0: * of a gfxContext. michael@0: */ michael@0: class gfxPath MOZ_FINAL { michael@0: NS_INLINE_DECL_REFCOUNTING(gfxPath) michael@0: michael@0: friend class gfxContext; michael@0: michael@0: gfxPath(cairo_path_t* aPath); michael@0: michael@0: public: michael@0: gfxPath(mozilla::gfx::Path* aPath); michael@0: michael@0: private: michael@0: // Private destructor, to discourage deletion outside of Release(): michael@0: ~gfxPath(); michael@0: michael@0: cairo_path_t* mPath; michael@0: mozilla::RefPtr mMoz2DPath; michael@0: }; michael@0: michael@0: #endif