コード例 #1
0
    public static Rect Deserialize(this SViewPortRect _rect)
    {
        Rect returnVal = new Rect
        {
            x      = _rect.x,
            y      = _rect.y,
            width  = _rect.w,
            height = _rect.h
        };

        return(returnVal);
    }
コード例 #2
0
    public static SViewPortRect Serialize(this Rect _rect)
    {
        if (_rect == null)
        {
            return(null);
        }

        SViewPortRect returnVal = new SViewPortRect
        {
            x = _rect.x,
            y = _rect.y,
            w = _rect.width,
            h = _rect.height
        };

        return(returnVal);
    }