Figure::Figure()
{
strokeColor.SetValue(Color::Black);//màu đen
strokeWidth = 2;//Nên để là 2 thì nhìn thấy rõ hơn
strokeOpacity = 1.0;
fillColor.SetValue(Color::White);//màu trắng
fillOpacity = 1.0;
rotateAxax = 0;
translateX = 0;
translateY = 0;
//attribute trỏ tới đám thuộc tính ở trên và thiết lập name tương ứng cho các thuộc tính
Attribute* tempStrokeColor;
tempStrokeColor = &UpdatedColor(strokeColor);
tempStrokeColor->SetName("stroke");
this->attribute.push_back(tempStrokeColor);
Attribute* tempStrokeWidth;
tempStrokeWidth = &Int(strokeWidth);
tempStrokeWidth->SetName("stroke-width");
this->attribute.push_back(tempStrokeWidth);
Attribute* tempStrokeOpacity;
tempStrokeOpacity = &Float(strokeOpacity);
tempStrokeOpacity->SetName("stroke-opacity");
this->attribute.push_back(tempStrokeOpacity);
Attribute* tempFillColor;
tempFillColor = &UpdatedColor(fillColor);
tempFillColor->SetName("fill");
this->attribute.push_back(tempFillColor);
Attribute* tempFillOpacity;
tempFillOpacity = &Float(fillOpacity);
tempFillOpacity->SetName("fill-opacity");
this->attribute.push_back(tempFillOpacity);
Attribute* tempRotateAxax;
tempRotateAxax = &Float(rotateAxax);
tempRotateAxax->SetName("rotate");
this->attribute.push_back(tempRotateAxax);
Attribute* tempTranslateX;
tempTranslateX = &Int(translateX);
tempTranslateX->SetName("translate-x");
this->attribute.push_back(tempTranslateX);
Attribute* tempTranslateY;
tempTranslateY = &Int(translateY);
tempTranslateY->SetName("translate-y");
this->attribute.push_back(tempTranslateY);
}