ios - Arc shape not rendered smoothly -


I made an arc at a casapeller 12 o'clock position and added it as a Sublayer on a UIView. The arc is rough or rough. I tried to join the antialiasing, the radius of the corner, line and tried to rasterize at one point but there was no luck. Why no idea why it is not smooth and what to do to make it smooth? If 9 or 3 make the same arc, they are smooth, but not 12 or 6 o'clock. Appreciate any help

Here is the code:

  CGMutablePathRef path = CGPathCreateMutable (); CGPathAddArc (path, zero, 38.25, 38.25, 25, degree toradiadia (304), degree oradian (236), yes); Caspelier * Size Layer = [Caspare Layer]; [Size Layer Set Alveoli Antialiasing: Yes]; [Size Layer SetAdateAlizing Mask: KCLAER LtAdge | KCLArrayAdge | KCL AirebottomAdge | KCALayerTopEdge]; [Size Layer Set Corner Radius: 2.0]; [Size Layer Settlement Zone: KCellineJoinRound]; [Size Layer SetfillRoller: [[UICLER clear collar] CGColor]]; [Size Layer Setstructloror: [Color Cigilillor]]; [Size Layer Set Lyneppap: KCLinAphere]; [Size Layer Set Linewidth: 3.0]; [Size Layer Setpeth: Path];  

Here is a link to the arc. The top and bottom are not smooth on the left side, they seem less smooth on the screen, like screen capture them, smoothed them out in fact more than

It looks like your layer is away from the pixel range. That is, this layer is to be zodiaced, then before transferring it to a partial number of pixels, my first suggestion would be to score those x.25 values ​​in whole numbers.

By the way, why are you passing in the form of 304, 236 as startAngle and andangle in CGPathAddArc () ? Those parameters are in radians, there are no degrees.

edge antialiasingmask and allow and what to do with the algorithm , which are provided in rectangular boundaries of the layer, and not affecting the content do.

Edit : The difference is subtle, but when I stop using partial values, a slight hurdle in the line gets removed. By the way, if you have your images Posting in PGG format, it is easy to see what is happening because they are not able to get artistic with JPG compression.

  // partial value CGMutablePathRef path = CGPathCreateMutable (); CGPathAddArc (route, zero, 138.25, 138.25, 25, degree tradian (304), degree tradian (236), yes); Caspelier * Size Layer = [Caspare Layer]; [Size Layer Settlement Zone: KCellineJoinRound]; [Size Layer SetfillRoller: [[UICLER clear collar] CGColor]]; [Size Layer Setstroke: [UIColor BlueColor] .CGColor]; [Size Layer Set Lyneppap: KCLinAphere]; [Size Layer Set Linewidth: 3.0]; [Size Layer Setpeth: Path]; CGPathRelease (path); [Self.view.layer addSublayer: Size Layer]; // Integral value CGMutablePathRef newPath = CGPathCreateMutable (); CGPathAddArc (Newpath, Zero, 200, 138, 25, Degree Toriyadian (304), Degree Toriyadia (236), Yes); CashPailer * Nachplelayer = [Caspelier Layer]; [Newshiplayer Setline Join: KCAllineJoinRound]; [NeoshPlayer SetfillCollar: CGColor [[UICLLAR clear collar]]; [Nashaplayer setstorerolar: [UIColor BlueColor] .CGColor]; [Nashaplayer set linepap: kclneeprand]; [Nashaplayer set linewidth: 3.0]; [Nashaplayer setpeth: neolith]; CGPathRelease (Newpath); [Self.view.layer addSublayer: newShapeLayer];  

More results:

side-by-side Compare

When I overlay them in intercept mode in Photoshop, you can see why the pixel is different:


Comments

Popular posts from this blog

Editing Python Class in Shell and SQLAlchemy -

import - Python ImportError: No module named wmi -

uislider - In a MATLAB GUI, how does one implement a continuously varying slider from a GUIDE created .m file? -