Changeset 8556:8d5abf58a7f7 in orange


Ignore:
Timestamp:
08/01/11 13:52:57 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
cf39c72af33df61babdd56729c53cdc00ebeae66
Message:

Do not antialiase edges.

Location:
source/orangeplot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • source/orangeplot/networkcurve.cpp

    r8525 r8556  
    156156 
    157157} 
     158 
     159 
     160void EdgeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) 
     161{ 
     162    painter->setRenderHint(QPainter::Antialiasing, false); 
     163    QGraphicsLineItem::paint(painter, option, widget); 
     164} 
     165 
    158166 
    159167void EdgeItem::set_u(NodeItem* item) 
     
    324332 
    325333    QMap<int, DataPoint> disp; 
    326     foreach (const NodeItem* node, m_nodes) 
     334    foreach (const NodeItem*   node, m_nodes) 
    327335    { 
    328336        DataPoint point; 
  • source/orangeplot/networkcurve.h

    r8525 r8556  
    7777    EdgeItem(NodeItem* u, NodeItem* v, QGraphicsItem* parent = 0, QGraphicsScene* scene = 0); 
    7878    virtual ~EdgeItem(); 
    79     
     79 
     80    virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); 
     81 
    8082    void set_u(NodeItem* item); 
    8183    NodeItem* u(); 
     
    127129    void operator()(EdgeItem* item) 
    128130    { 
    129         if (item->u() && item->v()) 
     131        NodeItem *u = item->u(); 
     132        NodeItem *v = item->v(); 
     133 
     134        if (u && v) 
    130135        { 
    131             item->setLine(QLineF(item->u()->x(), item->u()->y(), item->v()->x(), item->v()->y()) * m_t); 
     136            item->setLine(QLineF(u->x(), u->y(), v->x(), v->y()) * m_t); 
    132137        } 
    133138    } 
  • source/orangeplot/networkcurve.sip

    r8524 r8556  
    5555    EdgeItem(NodeItem* u, NodeItem* v, QGraphicsItem* parent /TransferThis/ = 0, QGraphicsScene* scene /TransferThis/ = 0); 
    5656    virtual ~EdgeItem(); 
     57     
     58    virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); 
    5759     
    5860    void set_u(NodeItem* item); 
Note: See TracChangeset for help on using the changeset viewer.