objective c - lines with thicker strokes in the middle with SpriteKit -
How can I attract lines using SpriteKit? They should be moderate and light on the edges.
This method adds a line that combines two points of view ...
- (zero) adlinkfirm: (CGPint) P1 Two point: (CP point) P2 with color: (SK Klolar) color {CGFloat dx = p2.x - p1.x; CGFloat dy = p2.y - p1.y; CGFloat angle = atan2 (dA, dx); CGFloat length = sqrt (dx * dx + dy * dy); SKShapeNode * size = [SKShapeNode node]; Shape. Pt = [Size with auto diamond: CGSizeMake (length, 2)]; Shape.lineWidth = 0.125; Shape.position = Sijeepiiaksmek (min (p 1 x, p 2.aks) + Fabs (DX) / 2, Min (P 1A, P 2kai) + Fabs (DI) / 2); Shape.fillColor = color; Shape. Stroke color = color; Shape. ZRotation = Angle; [Self linking child: shape]; }
This method creates a diamond-shaped path ...
- shaped with Diamond (Sijeepithfrank): (Sijisaisii) size {UIBezierPath * BezierPath = [UIBezierPath bezierPath]; [Bezirpath left to point: CG point make (- size quarter / 2, 0)]; [Bezierpath Adeline Towpoint: CG Pointsmake (0, -Security. High / 2)]; [Bezierpath Adeline tappoint: CG pointmack (size with / 2, 0)]; [Bezierpath Adeline Totpoint: CG PointMake (0, SizeHit / 2)]; [Bezierpath Karpapath]; Return Beggar Path CGP; }
Comments
Post a Comment