2012-02-28 65 views

回答

2

設置圖形上下文中的虛線圖案。

void CGContextSetLineDash (
    CGContextRef c, 
    CGFloat phase, 
    const CGFloat lengths[], 
    size_t count 
); 

參數 ...

長度

An array of values that specify the lengths of the painted segments and unpainted segments, respectively, of the dash pattern—or爲NULL沒有虛線模式。

For example, passing an array with the values [2,3] sets a dash pattern that alternates between a 2-user-space-unit-long painted segment and a 3-user-space-unit-long unpainted segment. Passing the values [1,3,4,2] sets the pattern to a 1-unit painted segment, a 3-unit unpainted segment, a 4-unit painted segment, and a 2-unit unpainted segment.