Beispiel #1
0
/**
 * fill image
 */
void UMImage::fill(const UMVec4d& color)
{
	for (UMImage::ImageBuffer::iterator it = mutable_list().begin(); it != mutable_list().end(); ++it)
	{
		(*it) = umbase::UMVec4d(color);
	}
}
Beispiel #2
0
/**
 * clear image buffer
 */
void UMImage::clear()
{
	for (int y = 0; y < height(); ++y)
	{
		for (int x = 0; x < width(); ++x)
		{
			int pos = width() * y + x;
			mutable_list().at(pos) = UMVec4d(0);
		}
	}
}
Beispiel #3
0
  _(ensures \oset_disjoint(dll_reach(h), dll_reach(i)))
{ 
  _(assume mutable_list(h))
  DLNode * j;
  if (h != NULL && i != h) 
  {
    j = i->prev;
    i->prev = NULL;
    j->next = NULL;
    i->prev = NULL;
  }
}
  _(ensures queue(head))
{
  _(assume mutable_qhead(head))
  QNode * fst = head->first;
  _(assume mutable_list(fst))
  QNode * fst_nxt = fst->next;

  head->first = fst_nxt;
  
  if (fst_nxt == NULL) {
    head->last = fst_nxt;
  }
  return head;

}