Post not yet marked as solved
i am working on an app that shows live generated content in full screen on my new macbook pro with monterey. it is meant to be projected in theatres etc.
but because i use microphone input there is a visible orange dot in the upper right corner.
how can i get rid of it?
Post not yet marked as solved
when i try to draw a NSAttributedString with CoreText it won't display the NSShadow attribute.
it will however work when i set the shadow with CoreGraphics before i draw but just not embedded in the attributed string.
am i doing it wrong, or is it just not implemented in CoreText?
CFAttributedString doesn't seem to have a shadow attribute. might that be the problem?
see the code below i use for drawing with CoreText.
best
joerg
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowBlurRadius = 10;
shadow.shadowOffset = NSMakeSize(0, 0);
shadow.shadowColor = NSColor.redColor;
NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"this is a test" attributes:@{
NSForegroundColorAttributeName: NSColor.blueColor,
NSShadowAttributeName: shadow,
}];
CTLineRef line = CTLineCreateWithAttributedString((CFAttributedStringRef)attrString);
CTLineDraw(line, currentContext);
CFRelease(line);