Tips and Frequently Asked Questions
Saving contents of NSView to an image file or stream
var bounds: NSRect; rep: NSBitmapImageRep; data: NSData; ms: TMemoryStream; begin TMSFMXNativeNSView1.View.lockFocus; bounds := TMSFMXNativeNSView1.View.bounds; rep := TNSBitmapImageRep.Wrap(TNSBitmapImageRep.Wrap(TNSBitmapImageRep.OCClass.alloc).initWithFocusedViewRect(bounds)); TMSFMXNativeNSView1.View.unlockFocus; data := rep.representationUsingType(NSPNGFileType, nil); //save to file data.writeToFile(NSSTR(TPath.GetDocumentsPath + PathDelim + 'test.png'), False); //save to stream ms := TMemoryStream.Create; ms.Write(data.bytes, data.length); Image1.Bitmap.LoadFromStream(ms); ms.Free; rep.release;
Pricing
Single Developer License
Small Team License
Site License
TMS mCL
€ 125
€
75
yearly renewal
license for 1 developer
BEST VALUE
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.