void ScaledFontDWrite::CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder) { // XXX - Check path builder type! PathBuilderD2D *pathBuilderD2D = static_cast<PathBuilderD2D*>(aBuilder); CopyGlyphsToSink(aBuffer, pathBuilderD2D->GetSink()); }
void ScaledFontDWrite::CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, BackendType aBackendType, const Matrix *aTransformHint) { if (aBackendType != BackendType::DIRECT2D) { ScaledFontBase::CopyGlyphsToBuilder(aBuffer, aBuilder, aBackendType, aTransformHint); return; } PathBuilderD2D *pathBuilderD2D = static_cast<PathBuilderD2D*>(aBuilder); CopyGlyphsToSink(aBuffer, pathBuilderD2D->GetSink()); }
TemporaryRef<Path> ScaledFontDWrite::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget) { if (aTarget->GetType() != BackendType::DIRECT2D) { return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget); } RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder(); PathBuilderD2D *pathBuilderD2D = static_cast<PathBuilderD2D*>(pathBuilder.get()); CopyGlyphsToSink(aBuffer, pathBuilderD2D->GetSink()); return pathBuilder->Finish(); }
TemporaryRef<Path> ScaledFontDWrite::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget) { if (aTarget->GetType() != BACKEND_DIRECT2D) { // For now we only support Direct2D. return NULL; } RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder(); PathBuilderD2D *pathBuilderD2D = static_cast<PathBuilderD2D*>(pathBuilder.get()); CopyGlyphsToSink(aBuffer, pathBuilderD2D->GetSink()); return pathBuilder->Finish(); }
void ScaledFontDWrite::CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, BackendType aBackendType, const Matrix *aTransformHint) { if (aBackendType != BackendType::DIRECT2D && aBackendType != BackendType::DIRECT2D1_1) { ScaledFontBase::CopyGlyphsToBuilder(aBuffer, aBuilder, aBackendType, aTransformHint); return; } PathBuilderD2D *pathBuilderD2D = static_cast<PathBuilderD2D*>(aBuilder); if (pathBuilderD2D->IsFigureActive()) { gfxCriticalNote << "Attempting to copy glyphs to PathBuilderD2D with active figure."; } CopyGlyphsToSink(aBuffer, pathBuilderD2D->GetSink()); }