本文整理匯總了C#中Qyoto.QColor類的典型用法代碼示例。如果您正苦於以下問題:C# QColor類的具體用法?C# QColor怎麽用?C# QColor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
QColor類屬於Qyoto命名空間,在下文中一共展示了QColor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Mouse
public Mouse()
: base()
{
speed = 0;
mouseEyeDirection = 0;
random = new Random();
color = new QColor(random.Next(255), random.Next(255), random.Next(255));
timer = new MouseTimer(this);
Rotate(random.Next(360 * 16));
}
示例2: PaintEvent
protected override void PaintEvent(QPaintEvent e)
{
QColor hourColor = new QColor(127, 0, 127);
QColor minuteColor = new QColor(0, 127, 127, 191);
int side = QMin(Width(), Height());
QTime time = QTime.CurrentTime();
QPainter painter = new QPainter(this);
painter.SetRenderHint(QPainter.RenderHint.Antialiasing);
painter.Translate(Width() / 2, Height() / 2);
painter.Scale(side / 200.0, side / 200.0);
painter.SetPen(Qt.PenStyle.NoPen);
painter.SetBrush(hourColor);
painter.Save();
painter.Rotate(30.0 * ((time.Hour() + time.Minute() / 60.0)));
painter.DrawConvexPolygon(new QPolygon(hourHand));
painter.Restore();
painter.SetPen(hourColor);
for (int i = 0; i < 12; ++i) {
painter.DrawLine(88, 0, 96, 0);
painter.Rotate(30.0);
}
painter.SetPen(Qt.PenStyle.NoPen);
painter.SetBrush(minuteColor);
painter.Save();
painter.Rotate(6.0 * (time.Minute() + time.Second() / 60.0));
painter.DrawConvexPolygon(new QPolygon(minuteHand));
painter.Restore();
painter.SetPen(minuteColor);
for (int j = 0; j < 60; ++j) {
if ((j % 5) != 0)
painter.DrawLine(92, 0, 96, 0);
painter.Rotate(6.0);
}
painter.End();
}
示例3: QColorDialog
public QColorDialog(QColor initial)
: this((Type) null)
{
CreateProxy();
interceptor.Invoke("QColorDialog#", "QColorDialog(const QColor&)", typeof(void), typeof(QColor), initial);
}
示例4: Write
public static QDataStream Write(QDataStream arg1, QColor arg2)
{
return (QDataStream) staticInterceptor.Invoke("operator<<##", "operator<<(QDataStream&, const QColor&)", typeof(QDataStream), typeof(QDataStream), arg1, typeof(QColor), arg2);
}
示例5: QDrawPlainRect
public static void QDrawPlainRect(QPainter p, QRect r, QColor arg3)
{
staticInterceptor.Invoke("qDrawPlainRect###", "qDrawPlainRect(QPainter*, const QRect&, const QColor&)", typeof(void), typeof(QPainter), p, typeof(QRect), r, typeof(QColor), arg3);
}
示例6: SetFormat
protected void SetFormat(int start, int count, QColor color)
{
interceptor.Invoke("setFormat$$#", "setFormat(int, int, const QColor&)", typeof(void), typeof(int), start, typeof(int), count, typeof(QColor), color);
}
示例7: SetEdgeColor
public void SetEdgeColor(QColor col)
{
interceptor.Invoke("setEdgeColor#", "setEdgeColor(const QColor&)", typeof(void), typeof(QColor), col);
}
示例8: SetCaretLineBackgroundColor
public virtual void SetCaretLineBackgroundColor(QColor col)
{
interceptor.Invoke("setCaretLineBackgroundColor#", "setCaretLineBackgroundColor(const QColor&)", typeof(void), typeof(QColor), col);
}
示例9: QPen
public QPen(QColor color)
: this((Type) null)
{
CreateProxy();
interceptor.Invoke("QPen#", "QPen(const QColor&)", typeof(void), typeof(QColor), color);
}
示例10: FillRect
public void FillRect(QRect arg1, QColor color)
{
interceptor.Invoke("fillRect##", "fillRect(const QRect&, const QColor&)", typeof(void), typeof(QRect), arg1, typeof(QColor), color);
}
示例11: SetPen
public void SetPen(QColor color)
{
interceptor.Invoke("setPen#", "setPen(const QColor&)", typeof(void), typeof(QColor), color);
}
示例12: SetLabelColor
/// <remarks>
/// Set text label color for the meter
/// <param> name="index" label index
/// </param><param> name="color" the color to apply to the label
/// </param></remarks> <short> Set text label color for the meter </short>
public void SetLabelColor(int index, QColor color)
{
interceptor.Invoke("setLabelColor$#", "setLabelColor(int, const QColor&)", typeof(void), typeof(int), index, typeof(QColor), color);
}
示例13: SendScintilla
public long SendScintilla(uint msg, QColor col)
{
return (long) interceptor.Invoke("SendScintilla$#", "SendScintilla(unsigned int, const QColor&) const", typeof(long), typeof(uint), msg, typeof(QColor), col);
}
示例14: SetUnmatchedBraceForegroundColor
public void SetUnmatchedBraceForegroundColor(QColor col)
{
interceptor.Invoke("setUnmatchedBraceForegroundColor#", "setUnmatchedBraceForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
}
示例15: SetCallTipsHighlightColor
public void SetCallTipsHighlightColor(QColor col)
{
interceptor.Invoke("setCallTipsHighlightColor#", "setCallTipsHighlightColor(const QColor&)", typeof(void), typeof(QColor), col);
}