9
我試圖用一個非常認真的筆畫(如0.25像素)做一個SKShapeNode。看來1的lineWidth是我可以去的最小的,至少這就是它在屏幕上看起來不像什麼值小於1的設置。如何爲SKShapeNode設置小於1的線寬?
SKShapeNode *buttonOutline;
buttonOutline = [[SKShapeNode alloc] init];
CGMutablePathRef myPath = CGPathCreateMutable();
CGPathAddRoundedRect(myPath, NULL, CGRectMake(0, 0, 100, 30), 10, 10);
buttonOutline.path = myPath;
buttonOutline.strokeColor=[SKColor grayColor];
buttonOutline.lineWidth= 0.25;
buttonOutline.name = [NSString stringWithFormat:@"%@-buttonOutline", thisButtonName];
buttonOutline.position = CGPointMake(thisXPos,thisYPod);
buttonOutline.alpha = 1;
謝謝你提供的,這個工作,我無法找到在此文檔的任何地方 –