Пример #1
0
        private static string GetStrokeOptions(DisplayCell cell)
        {
            if (cell.HasOutline)
            {
                return("stroke:#000000;stroke-width:0.2px");
            }

            return("stroke:none");
        }
Пример #2
0
        private static string GetFillOptions(DisplayCell cell)
        {
            if (cell.HasColor)
            {
                return(string.Format("fill:{0}", ColorToHex(cell.Color)));
            }

            return("fill:none");
        }
Пример #3
0
        private static string GetCell(DisplayCell cell, int id)
        {
            var s = "";

            s += string.Format("<path {0}", GetStyle(cell));
            s += " d=\"m" + string.Format("{0}L{1}L{2}", cell.Points[0], cell.Points[1], cell.Points[2]) + "z\"";
            s += " id=\"path" + id + "\"/>";

            return(s);
        }
Пример #4
0
        public DisplayCell ProjectCell(DisplayCell cell)
        {
            var newCell = cell;

            newCell.Points = cell.Points.Select(ProjectPoint).ToArray();
            if (newCell.Points.Any(point => point == null))
            {
                return(null);
            }
            return(newCell);
        }
Пример #5
0
        protected DisplayCell RenderBaseCell(Cell cell, CellRenderOptions options)
        {
            var newCell = new DisplayCell();

            newCell.Points = cell.Points.ToArray();
            if (newCell.Points.Any(point => point == null))
            {
                return(null);
            }

            newCell.HasOutline = options.ShowCellOutline;

            return(newCell);
        }
Пример #6
0
 public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
 {
     DisplayCell?.Invoke(this, new DisplayCellEventArgs(tableView, cell, indexPath));
 }
Пример #7
0
 private static string GetStyle(DisplayCell cell)
 {
     return(string.Format("style=\"{0};{1}\"", GetFillOptions(cell), GetStrokeOptions(cell)));
 }