A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
graphlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Remove multi-pass.
[graphlib.git]
/
DrawingWindow.cpp
diff --git
a/DrawingWindow.cpp
b/DrawingWindow.cpp
index
dac4246
..
ad74339
100644
(file)
--- a/
DrawingWindow.cpp
+++ b/
DrawingWindow.cpp
@@
-142,7
+142,7
@@
public:
{ }
};
-//! Demande de tracé de texte.
+//! Demande de tracé de texte.
class DrawTextEvent: public QEvent {
public:
const int x;
@@
-345,6
+345,19
@@
void DrawingWindow::setBgColor(float red, float green, float blue)
setBgColor(QColor::fromRgbF(red, green, blue));
}
+//! Change l'épaisseur du pinceau
+/*!
+ * Le pinceau à une épaisseur de 1 par défaut.
+ *
+ * \param width épaisseur du pinceau
+ */
+void DrawingWindow::setPenWidth(int width)
+{
+ QPen pen(painter->pen());
+ pen.setWidth(width);
+ painter->setPen(pen);
+}
+
//! Retourne la fonte courante utilisée pour dessiner du texte.
/*!
* \see QFont, setFont
@@
-363,6
+376,20
@@
void DrawingWindow::setFont(const QFont &font)
painter->setFont(font);
}
+//! Active ou non l'antialiasing.
+/*!
+ * Permet de lisser le dessin.
+ * Fonctionnalité désactivée par défaut.
+ *
+ * \param state état de l'antialiasing
+ *
+ * \bug expérimental
+ */
+void DrawingWindow::setAntialiasing(bool state)
+{
+ painter->setRenderHint(QPainter::Antialiasing, state);
+}
+
//! Efface la fenêtre.
/*!
* La fenêtre est effacée avec la couleur de fond courante.