AppendItem() 공개 메소드

public AppendItem ( SVGTransform, newItem ) : void
newItem SVGTransform,
리턴 void
예제 #1
0
        protected void Init()
        {
            _elementList = new List <object>();

            ViewBoxTransform();

            SVGTransform     temp = new SVGTransform(_cachedViewBoxTransform);
            SVGTransformList t_currentTransformList = new SVGTransformList(_attrList.GetValue("transform"));

            t_currentTransformList.AppendItem(temp);

            this.currentTransformList = t_currentTransformList;

            if (_rootElement)
            {
                // TODO Clip Paths does not works properly

                /*
                 * if(!SVGAssetImport.ignoreSVGCanvas)
                 * {
                 *  Rect viewport = paintable.viewport;
                 *  paintable.clipPathList.Add(new List<Vector2>{
                 *      new Vector2(viewport.x, viewport.y),
                 *      new Vector2(viewport.x + viewport.width, viewport.y),
                 *      new Vector2(viewport.x + viewport.width, viewport.y + viewport.height),
                 *      new Vector2(viewport.x, viewport.y + viewport.height)
                 *  });
                 * }
                 */
            }

            GetElementList();
        }
예제 #2
0
        protected void Init()
        {
            _elementList = new List<object>();

            ViewBoxTransform();

            SVGTransform temp = new SVGTransform(_cachedViewBoxTransform);
            SVGTransformList t_currentTransformList = new SVGTransformList(_attrList.GetValue("transform"));
            t_currentTransformList.AppendItem(temp);

            this.currentTransformList = t_currentTransformList;

            if(_rootElement)
            {
                // TODO Clip Paths does not works properly
                /*
                if(!SVGAssetImport.ignoreSVGCanvas)
                {
                    Rect viewport = paintable.viewport;
                    paintable.clipPathList.Add(new List<Vector2>{
                        new Vector2(viewport.x, viewport.y),
                        new Vector2(viewport.x + viewport.width, viewport.y),
                        new Vector2(viewport.x + viewport.width, viewport.y + viewport.height),
                        new Vector2(viewport.x, viewport.y + viewport.height)
                    });
                }
                */
            }

            GetElementList();
        }
예제 #3
0
    /***********************************************************************************/
    private void Initial()
    {
        //trich cac gia tri cua thuoc tinh VIEWBOX va chua vao trong _viewport
        SetViewBox();
        _elementList = new List <object>();

        //Viewbox transform se lay thuoc tinh VIEWBOX de tao ra 1 transform
        //va transform nay se chua trong _cachedViewBoxTransform
        ViewBoxTransform();

        //Tao currentTransformList va add cai transform dau tien vao, do la cai VIEWBOX.
        SVGTransform     temp = new SVGTransform(_cachedViewBoxTransform);
        SVGTransformList t_currentTransformList = new SVGTransformList();

        t_currentTransformList.AppendItem(temp);

        this.currentTransformList = t_currentTransformList;

        //Get all element between <SVG>...</SVG>
        GetElementList();
    }
예제 #4
0
    public SVGSVGElement(SVGParser xmlImp,
                       SVGTransformList inheritTransformList,
                       SVGPaintable inheritPaintable,
                       SVGGraphics r)
        : base(inheritTransformList)
    {
        _render = r;
        _attrList = xmlImp.Node.Attributes;
        var paintable = new SVGPaintable(inheritPaintable, _attrList);
        _width = new SVGLength(_attrList.GetValue("width"));
        _height = new SVGLength(_attrList.GetValue("height"));

        SetViewBox();

        ViewBoxTransform();

        SVGTransform temp = new SVGTransform(_cachedViewBoxTransform);
        SVGTransformList t_currentTransformList = new SVGTransformList();
        t_currentTransformList.AppendItem(temp);
        currentTransformList = t_currentTransformList; // use setter only once, since it also updates other lists

        xmlImp.GetElementList(_elementList, paintable, _render, summaryTransformList);
    }
예제 #5
0
    public SVGSVGElement(SVGParser xmlImp,
                         SVGTransformList inheritTransformList,
                         SVGPaintable inheritPaintable,
                         SVGGraphics r) : base(inheritTransformList)
    {
        _render   = r;
        _attrList = xmlImp.Node.Attributes;
        var paintable = new SVGPaintable(inheritPaintable, _attrList);

        _width  = new SVGLength(_attrList.GetValue("width"));
        _height = new SVGLength(_attrList.GetValue("height"));

        SetViewBox();

        ViewBoxTransform();

        SVGTransform     temp = new SVGTransform(_cachedViewBoxTransform);
        SVGTransformList t_currentTransformList = new SVGTransformList();

        t_currentTransformList.AppendItem(temp);
        currentTransformList = t_currentTransformList;         // use setter only once, since it also updates other lists

        xmlImp.GetElementList(_elementList, paintable, _render, summaryTransformList);
    }
예제 #6
0
    /***********************************************************************************/
    private void Initial()
    {
        //trich cac gia tri cua thuoc tinh VIEWBOX va chua vao trong _viewport
        SetViewBox();
        _elementList = new List<object>();

        //Viewbox transform se lay thuoc tinh VIEWBOX de tao ra 1 transform
        //va transform nay se chua trong _cachedViewBoxTransform
        ViewBoxTransform();

        //Tao currentTransformList va add cai transform dau tien vao, do la cai VIEWBOX.
        SVGTransform temp = new SVGTransform(_cachedViewBoxTransform);
        SVGTransformList t_currentTransformList = new SVGTransformList();
        t_currentTransformList.AppendItem(temp);

        this.currentTransformList = t_currentTransformList;

        //Get all element between <SVG>...</SVG>
        GetElementList();
    }