Reviewed by eseidel.
Use QColor <-> Color conversion operator, instead of faking it.
* platform/qt/FontQt.cpp:
(WebCore::Font::drawGlyphs):
* platform/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillRect):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16124
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-30 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by eseidel.
+
+ Use QColor <-> Color conversion operator, instead of faking it.
+
+ * platform/qt/FontQt.cpp:
+ (WebCore::Font::drawGlyphs):
+ * platform/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillRect):
+
2006-08-30 Rob Buis <buis@kde.org>
Reviewed by Eric.
#include "GraphicsContext.h"
#include <QPainter>
-#include <QDebug>
namespace WebCore {
QPainter& p = *graphicsContext->platformContext();
Color color = graphicsContext->pen().color();
- p.setPen(QColor(color.red(), color.green(), color.blue()));
+ p.setPen(QColor(color));
p.setFont(font->platformData().font());
QChar* buffer = reinterpret_cast<QChar*>(glyphBuffer.glyphs(from));
#include "config.h"
-#include "GraphicsContext.h"
#include "Path.h"
+#include "Color.h"
+#include "GraphicsContext.h"
#include <QStack>
#include <QPainter>
if (paintingDisabled())
return;
- m_data->p().fillRect(rect, QColor(c.red(), c.green(), c.blue(), c.alpha()));
+ m_data->p().fillRect(rect, QColor(c));
}
void GraphicsContext::fillRect(const FloatRect& rect, const Color& c)
if (paintingDisabled())
return;
- m_data->p().fillRect(rect, QColor(c.red(), c.green(), c.blue(), c.alpha()));
+ m_data->p().fillRect(rect, QColor(c));
}
void GraphicsContext::addClip(const IntRect& rect)