~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/CoreText/CTLine.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Authors: Mono Team
5
5
//     
6
6
// Copyright 2010 Novell, Inc
 
7
// Copyright 2011, 2012 Xamarin Inc
7
8
//
8
9
// Permission is hereby granted, free of charge, to any person obtaining
9
10
// a copy of this software and associated documentation files (the
41
42
                End = 1,
42
43
                Middle = 2
43
44
        }
 
45
 
 
46
        public enum CTLineBoundsOptions {
 
47
                ExcludeTypographicLeading  = 1 << 0,
 
48
                ExcludeTypographicShifts   = 1 << 1,
 
49
                UseHangingPunctuation      = 1 << 2,
 
50
                UseGlyphPathBounds         = 1 << 3,
 
51
                UseOpticalBounds           = 1 << 4
 
52
    }
44
53
        
45
54
        [Since (3,2)]
46
55
        public class CTLine : INativeObject, IDisposable {
168
177
                }
169
178
 
170
179
                [DllImport (Constants.CoreTextLibrary)]
 
180
                static extern RectangleF CTLineGetBoundsWithOptions (IntPtr line, CTLineBoundsOptions options);
 
181
                [Since (6,0)]
 
182
                public RectangleF GetBounds (CTLineBoundsOptions options)
 
183
                {
 
184
                        return CTLineGetBoundsWithOptions (handle, options);
 
185
                }
 
186
 
 
187
                [DllImport (Constants.CoreTextLibrary)]
171
188
                static extern double CTLineGetTypographicBounds (IntPtr line, out float ascent, out float descent, out float leading);
172
189
                public double GetTypographicBounds (out float ascent, out float descent, out float leading)
173
190
                {