Пример #1
0
 void GdiContext2D::restore()
 {
     Check();
     // pop state stack and restore state
     CanvasStateInfo* p = m_stack.back();
     m_stack.pop_back();
     p->m_SaveClipRgn.Restore();
     // push state on state stack
     //The current transformation matrix.
     //The current clipping region.
     //The current values of the following attributes:
     set_strokeStyle(p->strokeStyle);
     set_fillStyle(p->fillStyle);
     //globalAlpha,
     lineWidth = p->lineWidth;
     //lineCap,
     //lineJoin,
     //miterLimit,
     set_shadowOffsetX(p->shadowOffsetX);
     set_shadowOffsetY(p->shadowOffsetY);
     set_shadowBlur(p->shadowBlur);
     set_shadowColor(p->shadowColor);
     //globalCompositeOperation,
     set_font(p->font);
     set_textAlign(p->textAlign);
     set_textBaseline(p->textBaseline);
     delete p;
 }
Пример #2
0
CCanvasContext::CCanvasContext()
{ 
	globalAlpha = 1.0; 
	m_image = NULL;
	
	set_fillStyle("black");
	set_strokeStyle("black");
	
	m_brushCursor = CGPointMake(0, 0);
	m_brushState = BRUSH_UNFOCUS;

	lineWidth = 1.0;
	lineCap = "butt";
	lineJoin = "milter";
	miterLimit = 10.0;
}