Bytes
(Bytes)
May 14, 2024, 12:56am
1
@interface GlyphsFilterOffsetCurve : NSObject
+ (NSArray *)offsetPath:(GSPath *)path offsetX:(float)width offsetY:(float)height makeStroke:(bool)fill position:(float)pos;
@end
Is this definition incorrect? When I use it below, I cannot correctly bold the path, and the returned 'newPaths ’ is still the original path data.But it in python right.
NSArray *newPaths = [NSClassFromString(@"GlyphsFilterOffsetCurve") offsetPath:path offsetX:30 offsetY:30 makeStroke:NO position:0.5];
Bytes
(Bytes)
May 15, 2024, 1:10am
4
The same one closed path in python code return 'newPaths ’ is right.
OffsetCurve = NSClassFromString("GlyphsFilterOffsetCurve")
newPaths = OffsetCurve.offsetPath_offsetX_offsetY_makeStroke_position_(path, 30, 30, False, 0.5)
Did I make a mistake in writing somewhere in objc code?
I just tried it and it works for me. Can you send me (in a private message it needed) the full code?
Bytes
(Bytes)
May 15, 2024, 8:00am
6
I sended a message to you.
The problem is the type definition of the GlyphsFilterOffsetCurve method:
if has to be like this:
@interface GlyphsFilterOffsetCurve : NSObject
+ (NSArray *)offsetPath:(GSPath *)path offsetX:(CGFloat)width offsetY:(CGFloat)height makeStroke:(bool)fill position:(float)pos;
@end
(there were float
but it needs to be CGFloat
or double
)