2007-04-16 13:18:32 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-04-16 13:18:32 -07:00
|
|
|
|
|
|
|
#ifndef GFX_PATH_H
|
|
|
|
#define GFX_PATH_H
|
|
|
|
|
|
|
|
#include "gfxTypes.h"
|
2010-04-01 11:05:40 -07:00
|
|
|
#include "nsISupportsImpl.h"
|
2013-10-14 20:23:21 -07:00
|
|
|
#include "mozilla/RefPtr.h"
|
2007-04-16 13:18:32 -07:00
|
|
|
|
2008-07-18 11:26:02 -07:00
|
|
|
class gfxContext;
|
2007-04-16 13:18:32 -07:00
|
|
|
typedef struct cairo_path cairo_path_t;
|
|
|
|
|
2013-10-14 20:23:21 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
class Path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-18 11:26:02 -07:00
|
|
|
/**
|
|
|
|
* Class representing a path. Can be created by copying the current path
|
|
|
|
* of a gfxContext.
|
|
|
|
*/
|
2013-05-29 14:59:24 -07:00
|
|
|
class gfxPath {
|
2010-04-01 11:05:40 -07:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(gfxPath)
|
2007-04-16 13:18:32 -07:00
|
|
|
|
2008-07-18 11:26:02 -07:00
|
|
|
friend class gfxContext;
|
|
|
|
|
|
|
|
gfxPath(cairo_path_t* aPath);
|
|
|
|
|
|
|
|
public:
|
2013-10-24 08:50:26 -07:00
|
|
|
gfxPath(mozilla::gfx::Path* aPath);
|
2013-10-14 20:23:21 -07:00
|
|
|
virtual ~gfxPath();
|
2013-11-18 01:42:51 -08:00
|
|
|
|
|
|
|
private:
|
2013-10-14 20:23:21 -07:00
|
|
|
cairo_path_t* mPath;
|
2013-10-14 20:23:21 -07:00
|
|
|
mozilla::RefPtr<mozilla::gfx::Path> mMoz2DPath;
|
2007-04-16 13:18:32 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|