Changeset 8608:3aa6ea294a27 in orange


Ignore:
Timestamp:
08/04/11 22:48:39 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
b930407847f9baf587097af26c181ff88f9ab0c5
Message:

Make points transparent by default, and use the transparent property in the pixmap cache key

Location:
source/orangeplot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orangeplot/point.cpp

    r8604 r8608  
    1515    // symbol is less than 16, so 4 bits will do 
    1616    ret |= data.state << 9; 
     17    // state is currently only two bits 
     18    ret |= data.transparent << 11; 
    1719    // QRgb takes the full uins, so we just XOR by it 
    1820    ret ^= data.color.rgba(); 
     
    3234{ 
    3335    m_display_mode = DisplayPath; 
     36    m_transparent = true; 
    3437} 
    3538 
     
    4952    Q_UNUSED(widget) 
    5053     
    51     const PointData key(m_size, m_symbol, m_color, m_state); 
     54    const PointData key(m_size, m_symbol, m_color, m_state, m_transparent); 
    5255    // We make the pixmap slighly larger because the point outline has non-zero width 
    5356    const int ps = m_size + 4; 
  • source/orangeplot/point.h

    r8604 r8608  
    66struct PointData 
    77{ 
    8     PointData(int size, int symbol, const QColor& color, int state) : size(size), symbol(symbol), color(color), state(state) {} 
     8    PointData(int size, int symbol, const QColor& color, int state, bool transparent) : size(size), symbol(symbol), color(color), state(state), transparent(transparent) {} 
    99    int size; 
    1010    int symbol; 
    1111    QColor color; 
    1212    int state; 
     13    bool transparent; 
    1314}; 
    1415 
Note: See TracChangeset for help on using the changeset viewer.