Пример #1
0
        private static void Initialize()
        {
            _instance.name = "OnePxBorderStyle";

            _style = new ProgramaticStyle {
                Style = _instance
            };

            var border = new BorderMetrics(1); // 1px border
            var w      = border.GetRenderingWidth();
            var h      = border.GetRenderingHeight();

            //Debug.Log("w: " + w + ", h:" + h);

            _style.Border         = border.ToGUIStyleBorder();
            _style.NormalGraphics = new Rect(w, h, new Stroke(border)
            {
                Color = Color.white
            });
            _style.Commit();
        }
Пример #2
0
 public Stroke(int weight)
 {
     _border = new BorderMetrics(weight);
 }
Пример #3
0
 public Stroke(BorderMetrics border)
 {
     _border = border;
 }