20
24
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
25
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
namspace MonoMac.AppKit {
30
using System.Runtime.InteropServices;
32
namespace MonoMac.AppKit {
24
33
public partial class NSCell {
25
//APPKIT_EXTERN void NSDrawThreePartImage(NSRect frame, NSImage *startCap, NSImage *centerFill, NSImage *endCap, BOOL vertical, NSCompositingOperation op, CGFloat alphaFraction, BOOL flipped);
27
//APPKIT_EXTERN void NSDrawNinePartImage(NSRect frame, NSImage *topLeftCorner, NSImage *topEdgeFill, NSImage *topRightCorner, NSImage *leftEdgeFill, NSImage *centerFill, NSImage *rightEdgeFill, NSImage *bottomLeftCorner, NSImage *bottomEdgeFill, NSImage *bottomRightCorner, NSCompositingOperation op, CGFloat alphaFraction, BOOL flipped);
35
[DllImport (Constants.AppKitLibrary)]
36
extern static void NSDrawThreePartImage (RectangleF rect, IntPtr startCap, IntPtr centerFill, IntPtr endCap, bool vertial, int op, float alphaFraction, bool flipped);
38
public void DrawThreePartImage (RectangleF frame, NSImage startCap, NSImage centerFill, NSImage endCap, bool vertical, NSCompositingOperation op, float alphaFraction, bool flipped)
40
NSDrawThreePartImage (
41
frame, startCap != null ? startCap.Handle : IntPtr.Zero,
42
centerFill != null ? centerFill.Handle : IntPtr.Zero,
43
endCap != null ? endCap.Handle : IntPtr.Zero,
44
vertical, (int)op, alphaFraction, flipped);
47
[DllImport (Constants.AppKitLibrary)]
48
extern static void NSDrawNinePartImage (RectangleF frame, IntPtr topLeftCorner, IntPtr topEdgeFill, IntPtr topRightCorner, IntPtr leftEdgeFill, IntPtr centerFill, IntPtr rightEdgeFill, IntPtr bottomLeftCorner, IntPtr bottomEdgeFill, IntPtr bottomRightCorner, int op, float alphaFraction, bool flipped);
50
public void DrawNinePartImage (RectangleF frame, NSImage topLeftCorner, NSImage topEdgeFill, NSImage topRightCorner, NSImage leftEdgeFill, NSImage centerFill, NSImage rightEdgeFill, NSImage bottomLeftCorner, NSImage bottomEdgeFill, NSImage bottomRightCorner, NSCompositingOperation op, float alphaFraction, bool flipped)
53
frame, topLeftCorner != null ? topLeftCorner.Handle : IntPtr.Zero,
54
topEdgeFill != null ? topEdgeFill.Handle : IntPtr.Zero,
55
topRightCorner != null ? topRightCorner.Handle : IntPtr.Zero,
56
leftEdgeFill != null ? leftEdgeFill.Handle : IntPtr.Zero,
57
centerFill != null ? centerFill.Handle : IntPtr.Zero,
58
rightEdgeFill != null ? rightEdgeFill.Handle : IntPtr.Zero,
59
bottomLeftCorner != null ? bottomLeftCorner.Handle : IntPtr.Zero,
60
bottomEdgeFill != null ? bottomEdgeFill.Handle : IntPtr.Zero,
61
bottomRightCorner != null ? bottomRightCorner.Handle : IntPtr.Zero,
62
(int)op, alphaFraction, flipped);