gambas-source-code/main/lib/draw/main.c

79 lines
1.7 KiB
C
Raw Normal View History

/***************************************************************************
main.c
(c) 2000-2012 Benoît Minisini <gambas@users.sourceforge.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
***************************************************************************/
#define __MAIN_C
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "gb_common.h"
#include "cpoint.h"
#include "crect.h"
#include "cpaint.h"
#include "main.h"
GB_INTERFACE GB EXPORT;
IMAGE_INTERFACE IMAGE EXPORT;
GB_DESC *GB_CLASSES [] EXPORT =
{
PointDesc,
PointFDesc,
RectDesc,
RectFDesc,
[DEVELOPMENT ENVIRONMENT] * NEW: Update error messages. [GB.DRAW] * NEW: The Draw class has been removed. * NEW: Paint.Ellipse() is a new method that paints an ellipse. * NEW: Paint.TextSize() returns the bounding box of a text like Draw.TextWidth() and Draw.TextHeight() did, which is not the same thing as Paint.TextExtents(). * NEW: Paint.RichTextSize() returns the bounding box of a rich text like Draw.RichTextWidth() and Draw.RichTextHeight() did, which is not the same thing as Paint.RichTextExtents(). * NEW: Paint.FillRect() fills a rectangle with a specific color. * NEW: Paint.DrawImage() takes an extra 'Source' argument which is a rectangle describing a piece of the source image. * NEW: Paint.DrawPicture() now replaces the old Draw.Picture() method. * NEW: Paint.ZoomImage() now replaces the old Draw.Zoom() method. * NEW: The default line width after a Paint.Begin() is one pixel now. [GB.GTK] * NEW: DrawingArea.Painted has been deprecated. * BUG: Don't use the 'cairo_set_device_offset' method to draw on a DrawingArea, but a matrix translation. * NEW: Support for the new Paint methods. * NEW: The old Draw.Style methods have been moved to the Style class. * NEW: You cannot draw on a Window anymore. [GB.GUI.BASE] * NEW: Do not highlight the sorted column in GridView, TreeView, ListBox... if there is only one column. * NEW: Implement a new Draw class that simulates the old one by using the Paint class. [GB.JIT] * BUG: Fix the argument order of E_NSYMBOL error message. [GB.QT4] * NEW: DrawingArea.Painted has been deprecated. * NEW: Support for the new Paint methods. * NEW: The old Draw.Style methods have been moved to the Style class. * NEW: You cannot draw on a Window anymore. git-svn-id: svn://localhost/gambas/trunk@5382 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-11-27 19:42:24 +01:00
//CDrawClipDesc,
//CDrawStyleDesc,
//CDrawDesc,
PaintExtentsDesc,
PaintMatrixDesc,
PaintBrushDesc,
PaintDesc,
NULL
};
void *GB_DRAW_1[] EXPORT =
{
(void *)1,
(void *)PAINT_get_current,
(void *)PAINT_begin,
(void *)PAINT_end,
NULL
};
int EXPORT GB_INIT(void)
{
GB.Component.Load("gb.image");
GB.GetInterface("gb.image", IMAGE_INTERFACE_VERSION, &IMAGE);
return 0;
}
void EXPORT GB_EXIT()
{
}