Open dipsvaishnav opened 3 years ago
stroke = ( { point = ( { x = "117.5"; y = 384; }, { x = "119.5"; y = "379.5"; }, { x = 123; y = "365.5"; }, { x = "133.5"; y = "339.5"; }, { x = "145.5"; y = "306.5"; }, { x = "157.5"; y = "276.5"; }, { x = "169.5"; y = "249.5"; }, { x = "177.5"; y = "233.5"; }, { x = "184.5"; y = 221; }, { x = "191.5"; y = "208.5"; }, { x = "197.5"; y = 198; }, { x = 203; y = "185.5"; }, { x = "208.5"; y = 174; }, { x = 213; y = "164.5"; }, { x = 216; y = "157.5"; }, { x = 218; y = "152.5"; }, { x = "219.5"; y = "148.5"; }, { x = "220.5"; y = 146; }, { x = 221; y = "144.5"; }, { x = 221; y = "143.5"; }, { x = 221; y = 143; }, { x = 220; y = 143; }, { x = "210.5"; y = "144.5"; }, { x = 186; y = 158; }, { x = "160.5"; y = 179; }, { x = 136; y = "205.5"; }, { x = 117; y = 234; }, { x = "99.5"; y = "265.5"; }, { x = 85; y = 293; }, { x = 76; y = 319; }, { x = 71; y = 337; }, { x = 69; y = 351; }, { x = "67.5"; y = "360.5"; }, { x = "67.5"; y = 367; }, { x = "67.5"; y = 372; }, { x = "67.5"; y = "376.5"; }, { x = "67.5"; y = 380; }, { x = "68.5"; y = 383; }, { x = "71.5"; y = "384.5"; }, { x = "76.5"; y = 385; }, { x = 87; y = 385; }, { x = "105.5"; y = "380.5"; }, { x = "131.5"; y = 370; }, { x = 155; y = 358; }, { x = 176; y = 346; }, { x = "191.5"; y = 339; }, { x = "206.5"; y = "334.5"; }, { x = 219; y = 330; }, { x = 232; y = 328; }, { x = 244; y = "326.5"; }, { x = 256; y = "325.5"; }, { x = 271; y = 323; }, { x = 284; y = "320.5"; }, { x = "294.5"; y = "317.5"; }, { x = "305.5"; y = 313; }, { x = "312.5"; y = "309.5"; }, { x = 319; y = 306; }, { x = "327.5"; y = 300; } ); setting = { color = 164B4F; isRect = 0; width = 8; };
cell.imageView.af_setImage(withURL: url)
if DocSource?.image?.count != 0 {
if DocSource?.image?[indexPath.item].stroke?.count != 0 {
var pointsNew = [CGPoint]()
let Seetins = StrokeSettings()
for indexNew in 0..<(DocSource?.image?[indexPath.item].stroke?.count)!
{
Seetins.isRect = ((DocSource?.image?[indexPath.item].stroke?[0].setting?.isRect) != nil)
Seetins.width = CGFloat(DocSource?.image?[indexPath.item].stroke?[0].setting?.width ?? 0)
Seetins.color = CIColor(string: DocSource?.image?[indexPath.item].stroke?[0].setting?.color ?? "")
for index in 0..<(DocSource?.image?[indexPath.item].stroke?[indexNew].point!.count)!
{
pointsNew.append(CGPoint(x: DocSource?.image?[indexPath.item].stroke?[indexNew].point?[index].x ?? 0.0,y: DocSource?.image?[indexPath.item].stroke?[indexNew].point?[index].y ?? 0.0))
}
}
cell.drawView.importStack([Stroke(points: pointsNew, settings: Seetins)])
cell.drawView.beginImageContext()