view dwt/graphics/GCData.d @ 36:db5a898b2119

Fixed a lot of compile errors
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 07 Oct 2008 12:56:18 +0200
parents 5123b17c98ef
children 642f460a0908
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     
 * Port to the D programming language:
 *     Jacob Carlborg <jacob.carlborg@gmail.com>
 *******************************************************************************/
module dwt.graphics.GCData;


import dwt.DWT;
import dwt.internal.cocoa.NSAffineTransform;
import dwt.internal.cocoa.NSBezierPath;
import dwt.internal.cocoa.NSRect;
import dwt.internal.cocoa.NSSize;
import dwt.internal.cocoa.NSView;

import dwt.dwthelper.utils;
import dwt.graphics.Device;
import dwt.graphics.Pattern;
import dwt.graphics.Image;
import dwt.graphics.Font;
import dwt.internal.cocoa.CGFloat;

/**
 * Instances of this class are descriptions of GCs in terms
 * of unallocated platform-specific data fields.
 * <p>
 * <b>IMPORTANT:</b> This class is <em>not</em> part of the public
 * API for DWT. It is marked public only so that it can be shared
 * within the packages provided by DWT. It is not available on all
 * platforms, and should never be called from application code.
 * </p>
 */
public final class GCData {
    public Device device;
    public int style, state = -1;
    public CGFloat[] foreground;
    public CGFloat[] background;
    public Pattern foregroundPattern;
    public Pattern backgroundPattern;
    public Font font;
    public int alpha = 0xFF;
    public CGFloat lineWidth;
    public int lineStyle = DWT.LINE_SOLID;
    public int lineCap = DWT.CAP_FLAT;
    public int lineJoin = DWT.JOIN_MITER;
    public CGFloat lineDashesOffset;
    public CGFloat[] lineDashes;
    public CGFloat lineMiterLimit = 10;
    public bool xorMode;
    public int antialias = DWT.DEFAULT;
    public int textAntialias = DWT.DEFAULT;
    public int fillRule = DWT.FILL_EVEN_ODD;
    public ubyte* bitmapDataAddress;

    public Image image;
    
    public CGFloat drawXOffset, drawYOffset;
    public NSRect* paintRect;
    public NSBezierPath path;
    public NSAffineTransform transform, inverseTransform;
    public NSBezierPath clipPath;
    public NSView* view;
    public NSSize* size;
}