void GraphicsContext::strokePath(const Path& path)
{
    BlackBerry::Platform::Graphics::Path* pp = path.platformPath();
    if (!pp->isEmpty()) {
        BlackBerry::Platform::Graphics::Gradient* gradient = strokeGradient() ? strokeGradient()->platformGradient() : 0;
        BlackBerry::Platform::Graphics::Pattern* pattern = strokePattern() ? strokePattern()->platformPattern(AffineTransform()) : 0;
        platformContext()->addStrokePath(*pp, gradient, pattern);
    }
}
void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth)
{
    if (paintingDisabled())
        return;

    if (strokeGradient() || strokePattern()) {
        Path path;
        path.addRect(rect);
        float oldLineWidth = m_state.strokeThickness;
        setPlatformStrokeThickness(lineWidth);
        strokePath(path);
        setPlatformStrokeThickness(oldLineWidth);
    } else
        platformContext()->addStrokeRect(rect, lineWidth);
}