Permalink
Browse files

Draw all colors as black.

  • Loading branch information...
1 parent 2e11e22 commit db5afb1d6bf18c19df68cf27db5890a2c6e35ef0 @peter-x committed Apr 15, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 scribblearea.cpp
View
@@ -40,7 +40,8 @@ void ScribbleGraphicsContext::drawPage(const ScribblePage &page, int maxLayer)
void ScribbleGraphicsContext::drawStroke(const ScribbleStroke &stroke)
{
QPen pen = stroke.getPen();
- unsigned char color = undraw ? 0xff : pen.color().lightness();
+ unsigned char color = undraw ? 0xff : 0x00; //pen.color().lightness();
+ /* TODO can we draw in different levels of gray? */
const QPolygonF &points = stroke.getPoints();
if (painter) {
@@ -58,7 +59,8 @@ void ScribbleGraphicsContext::drawStroke(const ScribbleStroke &stroke)
void ScribbleGraphicsContext::drawStrokeSegment(const ScribbleStroke &stroke, int i)
{
QPen pen = stroke.getPen();
- unsigned char color = undraw ? 0xff : pen.color().lightness();
+ unsigned char color = undraw ? 0xff : 0x00; //pen.color().lightness();
+ /* TODO can we draw in different levels of gray? */
const QPolygonF &points = stroke.getPoints();
if (painter) {
drawLinePainter(points[i].toPoint(), points[i + 1].toPoint(), color, qCeil(pen.widthF()));

0 comments on commit db5afb1

Please sign in to comment.