private static string GetStrokeOptions(DisplayCell cell) { if (cell.HasOutline) { return("stroke:#000000;stroke-width:0.2px"); } return("stroke:none"); }
private static string GetFillOptions(DisplayCell cell) { if (cell.HasColor) { return(string.Format("fill:{0}", ColorToHex(cell.Color))); } return("fill:none"); }
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); }
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); }
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); }
public override void WillDisplay(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath) { DisplayCell?.Invoke(this, new DisplayCellEventArgs(tableView, cell, indexPath)); }
private static string GetStyle(DisplayCell cell) { return(string.Format("style=\"{0};{1}\"", GetFillOptions(cell), GetStrokeOptions(cell))); }