本文整理汇总了C++中ImpressionistUI::getIsPaint方法的典型用法代码示例。如果您正苦于以下问题:C++ ImpressionistUI::getIsPaint方法的具体用法?C++ ImpressionistUI::getIsPaint怎么用?C++ ImpressionistUI::getIsPaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImpressionistUI
的用法示例。
在下文中一共展示了ImpressionistUI::getIsPaint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BrushMove
void ScatteredTriangleBrush::BrushMove(const Point source, const Point target)
{
ImpressionistDoc* pDoc = GetDocument();
ImpressionistUI* dlg = pDoc->m_pUI;
int size = pDoc->getSize();
glPointSize((float)size);
if (pDoc == NULL) {
printf("PointBrush::BrushMove document is NULL\n");
return;
}
for (int i = 0; i < rand() % 6 + 2; i++){
// rand size start
if(dlg->getIsPaint() && dlg->getIsRandSize()){
size = rand() % pDoc->getSize() + 1;
}
// rand size end
int randx = target.x - size / 2 + irand(size);
int randy = target.y - size / 2 + irand(size);
glBegin(GL_TRIANGLES);
SetColor(source);
glVertex2d(randx, randy + sqrt(0.75 * size * size) / 2);
glVertex2d(randx - 0.5 * size, randy - sqrt(0.75 * size * size) / 2);
glVertex2d(randx + 0.5 * size, randy - sqrt(0.75 * size * size) / 2);
glEnd();
}
}
示例2: BrushMove
void TriangleBrush::BrushMove(const Point source, const Point target)
{
ImpressionistDoc* pDoc = GetDocument();
ImpressionistUI* dlg = pDoc->m_pUI;
int size = pDoc->getSize();
glPointSize((float)size);
// rand size start
if(dlg->getIsPaint() && dlg->getIsRandSize()){
size = rand() % pDoc->getSize() + 1;
}
// rand size end
if (pDoc == NULL) {
printf("PointBrush::BrushMove document is NULL\n");
return;
}
glBegin(GL_TRIANGLES);
SetColor(source);
glVertex2d(target.x, target.y + sqrt(0.75 * size * size) / 2);
glVertex2d(target.x - 0.5 * size, target.y - sqrt(0.75 * size * size) / 2);
glVertex2d(target.x + 0.5 * size, target.y - sqrt(0.75 * size * size) / 2);
glEnd();
}