當前位置: 首頁>>代碼示例>>C#>>正文


C# Qyoto.QColor類代碼示例

本文整理匯總了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));
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:10,代碼來源:mouse.cs

示例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();
    }
開發者ID:KDE,項目名稱:qyoto,代碼行數:46,代碼來源:analogclock.cs

示例3: QColorDialog

 public QColorDialog(QColor initial)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QColorDialog#", "QColorDialog(const QColor&)", typeof(void), typeof(QColor), initial);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:6,代碼來源:QColorDialog.cs

示例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);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:Qt.cs

示例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);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:Qt.cs

示例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);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:4,代碼來源:QSyntaxHighlighter.cs

示例7: SetEdgeColor

 public void SetEdgeColor(QColor col)
 {
     interceptor.Invoke("setEdgeColor#", "setEdgeColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QsciScintilla.cs

示例8: SetCaretLineBackgroundColor

 public virtual void SetCaretLineBackgroundColor(QColor col)
 {
     interceptor.Invoke("setCaretLineBackgroundColor#", "setCaretLineBackgroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QsciScintilla.cs

示例9: QPen

 public QPen(QColor color)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QPen#", "QPen(const QColor&)", typeof(void), typeof(QColor), color);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:6,代碼來源:QPen.cs

示例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);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:4,代碼來源:QPainter.cs

示例11: SetPen

 public void SetPen(QColor color)
 {
     interceptor.Invoke("setPen#", "setPen(const QColor&)", typeof(void), typeof(QColor), color);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:4,代碼來源:QPainter.cs

示例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);
 }
開發者ID:0xd34df00d,項目名稱:Qross,代碼行數:9,代碼來源:Plasma_Meter.cs

示例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);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QsciScintillaBase.cs

示例14: SetUnmatchedBraceForegroundColor

 public void SetUnmatchedBraceForegroundColor(QColor col)
 {
     interceptor.Invoke("setUnmatchedBraceForegroundColor#", "setUnmatchedBraceForegroundColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QsciScintilla.cs

示例15: SetCallTipsHighlightColor

 public void SetCallTipsHighlightColor(QColor col)
 {
     interceptor.Invoke("setCallTipsHighlightColor#", "setCallTipsHighlightColor(const QColor&)", typeof(void), typeof(QColor), col);
 }
開發者ID:KDE,項目名稱:qyoto,代碼行數:4,代碼來源:QsciScintilla.cs


注:本文中的Qyoto.QColor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。