2011-07-28 14:26:00 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-02-22 20:34:01 +00:00
|
|
|
|
2011-08-19 15:42:31 +00:00
|
|
|
#include "GrPathRenderer.h"
|
2011-06-30 19:37:01 +00:00
|
|
|
|
2012-03-02 21:26:50 +00:00
|
|
|
GrPathRenderer::GrPathRenderer() {
|
2011-07-01 14:57:55 +00:00
|
|
|
}
|
2013-05-20 16:49:06 +00:00
|
|
|
|
|
|
|
void GrPathRenderer::GetPathDevBounds(const SkPath& path,
|
|
|
|
int devW, int devH,
|
|
|
|
const SkMatrix& matrix,
|
|
|
|
SkRect* bounds) {
|
|
|
|
if (path.isInverseFillType()) {
|
|
|
|
*bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
*bounds = path.getBounds();
|
|
|
|
matrix.mapRect(bounds);
|
|
|
|
}
|