comparison dwt/graphics/GlyphMetrics.d @ 259:c0d810de7093

Update SWT 3.4M7 to 3.4
author Frank Benoit <benoit@tionex.de>
date Sun, 29 Jun 2008 14:33:38 +0200
parents 380bad9f6852
children
comparison
equal deleted inserted replaced
257:cc1d3de0e80b 259:c0d810de7093
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2006 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
30 * required, and thus no <code>dispose()</code> method is provided. 30 * required, and thus no <code>dispose()</code> method is provided.
31 * </p> 31 * </p>
32 * 32 *
33 * @see TextStyle 33 * @see TextStyle
34 * @see TextLayout 34 * @see TextLayout
35 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
35 * 36 *
36 * @since 3.2 37 * @since 3.2
37 */ 38 */
38 public final class GlyphMetrics { 39 public final class GlyphMetrics {
39 40
54 55
55 /** 56 /**
56 * Constructs an instance of this class with the given 57 * Constructs an instance of this class with the given
57 * ascent, descent and width values. 58 * ascent, descent and width values.
58 * 59 *
60 * @param ascent the GlyphMetrics ascent
61 * @param descent the GlyphMetrics descent
62 * @param width the GlyphMetrics width
63 *
59 * @exception IllegalArgumentException <ul> 64 * @exception IllegalArgumentException <ul>
60 * <li>ERROR_INVALID_ARGUMENT - if the ascent, descent or width argument is negative</li> 65 * <li>ERROR_INVALID_ARGUMENT - if the ascent, descent or width argument is negative</li>
61 * </ul> 66 * </ul>
62 */ 67 */
63 public this(int ascent, int descent, int width) { 68 public this(int ascent, int descent, int width) {
64 if (ascent < 0 || descent < 0 || width < 0) { 69 if (ascent < 0 || descent < 0 || width < 0) {
65 DWT.error(DWT.ERROR_INVALID_ARGUMENT); 70 DWT.error(DWT.ERROR_INVALID_ARGUMENT);
66 } 71 }
67 this.ascent = ascent; 72 this.ascent = ascent;
68 this.descent = descent; 73 this.descent = descent;
69 this.width = width; 74 this.width = width;
70 } 75 }