Beispiel #1
0
void WBrush::setColor(const WColor& color)
{
  checkModifiable();
  color_ = color;
  if (style_ == BrushStyle::Gradient)
    style_ = BrushStyle::Solid;
}
Beispiel #2
0
void WBrush::setGradient(const WGradient& gradient)
{
  checkModifiable();
  if (!gradient_.isEmpty()) {
    gradient_ = gradient;
    style_ = BrushStyle::Gradient;
  }
}
Beispiel #3
0
void stSortedSet_insert(stSortedSet *sortedSet, void *object) {
    checkModifiable(sortedSet);
    // FIXME: two passes, modify avl code.
    if(stSortedSet_search(sortedSet, object) != NULL) {
        avl_replace(sortedSet->sortedSet, object);
    }
    else {
        avl_insert(sortedSet->sortedSet, object);
    }
}
Beispiel #4
0
void stSortedSet_destruct(stSortedSet *sortedSet) {
#if 0 // FIXME
    // this breaks the tests, which leak iterators.  Need to revisit with
    // Benedict and also figure out how to tests this.  In the mean time,
    // this is for an urgent bug.
    checkModifiable(sortedSet);
#endif
    void *a = sortedSet->sortedSet->avl_param;
    if(sortedSet->destructElementFn != NULL) {
        st_sortedSet_destruct_destructElementFn = sortedSet->destructElementFn;
        avl_destroy(sortedSet->sortedSet, (void (*)(void *, void *))st_sortedSet_destructP);
    }
    else {
        avl_destroy(sortedSet->sortedSet, NULL);
    }
    free(a);
    free(sortedSet);
}
Beispiel #5
0
void WBrush::setStyle(BrushStyle style)
{
  checkModifiable();
  style_ = style;
}
Beispiel #6
0
void WTransform::reset()
{
  checkModifiable();
  m_[M11] = m_[M22] = 1;
  m_[M21] = m_[M12] = m_[M13] = m_[M23] = 0;
}
Beispiel #7
0
void stSortedSet_remove(stSortedSet *sortedSet, void *object) {
    checkModifiable(sortedSet);
    avl_delete(sortedSet->sortedSet, object);
}