Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag 'XSP_0_16'.

svn path=/tags/XSP_0_16/libgdiplus/; revision=30344
  • Loading branch information...
commit 3eba0a2799001671c5532d03a6c545e76179ad0d 1 parent 8289244
nobody authored
Showing with 0 additions and 30,063 deletions.
  1. +0 −15 .cvsignore
  2. +0 −11 AUTHORS
  3. +0 −1  COPYING
  4. +0 −33 ChangeLog
  5. +0 −9 Makefile.am
  6. +0 −1  NEWS
  7. +0 −16 README
  8. +0 −143 autogen.sh
  9. +0 −12 libgdiplus.pc.in
  10. +0 −6,299 ltmain.sh
  11. +0 −7 src/.cvsignore
  12. +0 −1,740 src/ChangeLog
  13. +0 −48 src/Makefile.am
  14. +0 −214 src/adjustablearrowcap.c
  15. +0 −951 src/bitmap.c
  16. +0 −452 src/bmpcodec.c
  17. +0 −52 src/bmpcodec.h
  18. +0 −65 src/brush.c
  19. +0 −39 src/brush.h
  20. +0 −270 src/customlinecap.c
  21. +0 −49 src/customlinecap.h
  22. +0 −737 src/font.c
  23. +0 −1,213 src/gdip.h
  24. +0 −141 src/gdipImage.h
  25. +0 −397 src/gdip_win32.c
  26. +0 −181 src/gdip_win32.h
  27. +0 −507 src/general.c
  28. +0 −411 src/gifcodec.c
  29. +0 −37 src/gifcodec.h
  30. +0 −950 src/graphics-path.c
  31. +0 −82 src/graphics-path.h
  32. +0 −2,902 src/graphics.c
  33. +0 −2,451 src/hatchbrush.c
  34. +0 −92 src/hatchbrush.h
  35. +0 −1,537 src/image.c
  36. +0 −367 src/imageattributes.c
  37. +0 −723 src/jpegcodec.c
  38. +0 −38 src/jpegcodec.h
  39. +0 −985 src/lineargradientbrush.c
  40. +0 −75 src/lineargradientbrush.h
  41. +0 −366 src/matrix.c
  42. +0 −597 src/pathgradientbrush.c
  43. +0 −79 src/pathgradientbrush.h
  44. +0 −881 src/pen.c
  45. +0 −484 src/pngcodec.c
  46. +0 −34 src/pngcodec.h
  47. +0 −1,155 src/region.c
  48. +0 −137 src/solidbrush.c
  49. +0 −29 src/solidbrush.h
  50. +0 −301 src/stringformat.c
  51. +0 −9 src/test.c
  52. +0 −836 src/texturebrush.c
  53. +0 −46 src/texturebrush.h
  54. +0 −414 src/tiffcodec.c
  55. +0 −43 src/tiffcodec.h
  56. +0 −7 tests/.cvsignore
  57. +0 −23 tests/ChangeLog
  58. +0 −37 tests/Makefile.am
  59. BIN  tests/test.bmp
  60. BIN  tests/test.gif
  61. BIN  tests/test.jpg
  62. BIN  tests/test.png
  63. BIN  tests/test.tif
  64. +0 −130 tests/testbits.c
  65. +0 −202 tests/testgdi.c
View
15 .cvsignore
@@ -1,15 +0,0 @@
-aclocal.m4
-autom4te.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-libgdiplus.pc
-libtool
-ltmain.sh
-stamp-h1
-Makefile
-Makefile.in
View
11 AUTHORS
@@ -1,11 +0,0 @@
-The following people made libgdiplus happen:
-
- Alexandre Pigolkine
- Duncan Mak
- Jordi Mas
- Mark Steele
- Miguel de Icaza
- Ravindra Kumar
- Vladimir Vukicevic
- Sanjay Gupta
- Peter Bartok
View
1  COPYING
@@ -1 +0,0 @@
-Libgdiplus is available under the terms of the MIT X11 license.
View
33 ChangeLog
@@ -1,33 +0,0 @@
-2004-05-27 Jordi Mas
- * configure.in. make libpng optional depending on the user's system
-
-2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * libgdiplus.pc.in: cairo package name is not cairo-0.1.17.
-
-2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * configure.in: added configuration summary.
-
-2004-05-05 Ravindra <rkumar@novell.com>
-
- * configure.in: We need cairo 0.1.22 version.
-
-2004-04-17 Vladimir Vukicevic <vladimir@pobox.com>
-
- * configure.in: fixed gdip_ok -> $gdip_ok in sigsetjmp check
-
-2004-04-04 Vladimir Vukicevic <vladimir@pobox.com>
-
- * configure.in: "libpng", not "libgpng"
-
- * configure.in: Add checks for libungif and libpng. Added
- sigsetjmp check.
-
- * configure.in: Added checks for libtiff and libjpeg. Cribbed
- from gtk. Also added in test/Makefile target.
-
-2004-01-31 Miguel de Icaza <miguel@ximian.com>
-
- * Initial release, split from the Mono's MCS package.
-
View
9 Makefile.am
@@ -1,9 +0,0 @@
-SUBDIRS = src tests
-
-pkgconfigdir = $(libdir)/pkgconfig
-
-pkgconfig_DATA= libgdiplus.pc
-
-DISTCLEANFILES= libgdiplus.pc
-
-EXTRA_DIST = libgdiplus.pc.in
View
1  NEWS
@@ -1 +0,0 @@
-First release of libgdiplus, spun off from Mono's C# library.
View
16 README
@@ -1,16 +0,0 @@
-libgdiplus: An Open Source implementation of the GDI+ API.
-
-This is part of the Mono project
-
-Requirements:
-
- This requires Cairo vector graphics library to build. See http://www.cairographics.org/
-
-To build:
-
- ./configure --prefix=YOUPREFIX
- make
-
-To install:
-
- make install
View
143 autogen.sh
@@ -1,143 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-# Ripped off from GNOME macros version
-
-DIE=0
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-if [ -n "$MONO_PATH" ]; then
- # from -> /mono/lib:/another/mono/lib
- # to -> /mono /another/mono
- for i in `echo ${MONO_PATH} | tr ":" " "`; do
- i=`dirname ${i}`
- if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
- ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
- fi
- if [ -n "{i}" -a -d "${i}/bin" ]; then
- PATH="${i}/bin:$PATH"
- fi
- done
- export PATH
-fi
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`autoconf' installed to compile Mono."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
-
-if [ -z "$LIBTOOL" ]; then
- LIBTOOL=`which glibtool 2>/dev/null`
- if [ ! -x "$LIBTOOL" ]; then
- LIBTOOL=`which libtool`
- fi
-fi
-
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
- ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`libtool' installed to compile Mono."
- echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
- }
-}
-
-grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
- grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
- (gettext --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`gettext' installed to compile Mono."
- echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
- }
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`automake' installed to compile Mono."
- echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
- NO_AUTOMAKE=yes
-}
-
-
-# if no automake, don't bother testing for aclocal
-test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: Missing \`aclocal'. The version of \`automake'"
- echo "installed doesn't appear recent enough."
- echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
-}
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
-if test -z "$*"; then
- echo "**Warning**: I am going to run \`configure' with no arguments."
- echo "If you wish to pass any to it, please specify them on the"
- echo \`$0\'" command line."
- echo
-fi
-
-case $CC in
-xlc )
- am_opt=--include-deps;;
-esac
-
-
-if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
- if test -z "$NO_LIBTOOLIZE" ; then
- echo "Running libtoolize..."
- #${LIBTOOL}ize --force --copy
- ${LIBTOOL}ize --copy
- fi
-fi
-
-echo "Running aclocal $ACLOCAL_FLAGS ..."
-aclocal $ACLOCAL_FLAGS || {
- echo
- echo "**Error**: aclocal failed. This may mean that you have not"
- echo "installed all of the packages you need, or you may need to"
- echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
- echo "for the prefix where you installed the packages whose"
- echo "macros were not found"
- exit 1
-}
-
-if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
- echo "Running autoheader..."
- autoheader || { echo "**Error**: autoheader failed."; exit 1; }
-fi
-
-echo "Running automake --gnu $am_opt ..."
-automake --add-missing --gnu $am_opt ||
- { echo "**Error**: automake failed."; exit 1; }
-echo "Running autoconf ..."
-autoconf || { echo "**Error**: autoconf failed."; exit 1; }
-
-if test -d $srcdir/libgc; then
- echo Running libgc/autogen.sh ...
- (cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
- echo Done running libgc/autogen.sh ...
-fi
-
-
-conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
-
-if test x$NOCONFIGURE = x; then
- echo Running $srcdir/configure $conf_flags "$@" ...
- $srcdir/configure $conf_flags "$@" \
- && echo Now type \`make\' to compile $PKG_NAME || exit 1
-else
- echo Skipping configure process.
-fi
View
12 libgdiplus.pc.in
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-
-Name: libgdiplus
-Description: GDI+ implementation
-Version: @VERSION@
-Requires: glib-2.0 gmodule-2.0 gthread-2.0 cairo
-Libs: -L${libdir} -lgdiplus @GDIPLUS_LIBS@
-Cflags: -I${includedir} @GDIPLUS_CFLAGS@
View
6,299 ltmain.sh
0 additions, 6,299 deletions not shown
View
7 src/.cvsignore
@@ -1,7 +0,0 @@
-*.lo
-*.la
-.deps
-.libs
-Makefile
-Makefile.in
-
View
1,740 src/ChangeLog
@@ -1,1740 +0,0 @@
-2004-06-24 Ravindra <rkumar@novell.com>
-
- * graphics.c: Modified GdipFillXXX operations to make use of
- the matrix set by brush setup. Also, moved all the GdipFillXXX
- functions to one place.
-
-2004-06-24 Sanjay Gupta <gsanjay@novell.com>
-
- * gdip.h: Changed function signature for SeekDelegate function.
- * tiffcodec.c: Minor modification in passing flags to libtiff.
-
-2004-06-23 Jordi Mas <jordi@ximian.com>
-
- * gdip.h, graphics.c: Implement Get/Set Unit and Scale. We will need when we implement
- GdipTransformPoints
-
-2004-06-23 Jordi Mas <jordi@ximian.com>
-
- * image.c: fixes bug 60601, simple images where not drawn on the right place
-
-2004-06-22 Ravindra <rkumar@novell.com>
-
- * lineargradientbrush.h: Added two members 'changed' and 'pattern'
- to GpLineGradient struct to avoid unnecessary multiple brush setup.
- * lineargradientbrush.c: Changes related to above and some fixes.
-
-2004-06-22 Jordi Mas <jordi@ximian.com>
-
- * gdip.h, graphics.c: implement Clip API function calls
- * region.c: remove unused vars
-
-2004-06-22 Ravindra <rkumar@novell.com>
-
- * texturebrush.c: We need to reset the 'changed' flag after doing
- brush setup.
-
-2006-06-21 Sanjay Gupta <gsanjay@novell.com>
-
- * tiffcodec.c: Added dummy functions and changed the way we
- were reading/writing tif image from/to stream.
-
-2006-06-17 Sanjay Gupta <gsanjay@novell.com>
-
- * tiffcodec.c: ABGR 2 ARGB conversion while saving.
- Default tiff format of ARGB was converted to our local format ABGR
- while reading, but in write operation we were not converting back
- to ARGB format and hence messy image.
-
-2004-06-17 Sanjay Gupta <gsanjay@novell.com>
-
- * image.c: Removed a commented line of code. Got checked in by mistake.
-
-2004-06-16 Sanjay Gupta <gsanjay@novell.com>
-
- * gdipImage.h: Modifed function signature
- GdipSaveImageToDelegate_linux().
- * image.c : Modified call to save tiff image from stream delgate.
- * tiffcodec.c, tiffcodec.h : Modified API signature and implemented
- functions to save tiff images to stream.
-
-2004-06-16 Sanjay Gupta <gsanjay@novell.com>
-
- * tiffcodec.c, tiffcodec.h: Implemented methods for loading tiff
- images from stream.
-
-2004-06-16 Ravindra <rkumar@novell.com>
-
- * graphics.c: Removed unnecessary calls to cairo_save and
- cairo_restore from GdipFillXXX functions.
-
-2004-06-15 Ravindra <rkumar@novell.com>
-
- * texturebrush.h: Added two members 'changed & pattern' to GpTexture
- struct to avoid unnecessary texture setup.
- * texturebrush.c: Fixed the code to avoid the seam. Setup related
- enhancement. Replaced cairo_show_surface by cairo_fill for creating
- pattern. This was required to fix the problem with Graphics.DrawXXX,
- as DrawXXX functions stopped working for texturebrush because of
- transformation matrix fix in pen.c (my previous checkin).
-
-2004-06-15 Sanjay Gupta <gsanjay@novell.com>
-
- * gdip.h: Added function typedefs, (*CloseDelegate), (*SizeDelegate).
- * gdipImage.h: Modifed function signature
- GdipLoadImageFromDelegate_linux().
- * image.c : Modified call to load tiff image from stream delgate.
- * tiffcodec.c, tiffcodec.h : Modified API signature for loading tiff
- images from stream.
-
-2004-06-14 Peter Bartok <pbartok@novell.com>
- * general.c: Fixed internal cairo function name to be gdi
- specific.
-
-2004-06-10 Sanjay Gupta <gsanjay@novell.com>
-
- * gifcodec.c: Minor error handling.
- * tiffcodec.c, tiffcodec.h: Added function stubs for loading
- and saving images from/to streams. Also modified API to include
- encoder parameter.
- * image.c: Minor indentation fixes, fixed incorrect image format
- assignment in loading images from stream, error handling and
- including call to load/save tiff images from stream.
-
-2004-06-10 Jordi Mas <jordi@ximian.com>
-
- * gifcodec.c: fixes the stubs signatures when libgif is not installed
-
-2004-06-09 Jordi Mas <jordi@ximian.com>
- * font.c, gdip.h: implemtents cache for generic family fonts,
- and properly keep track of resources and deallocate them.
-
-2004-06-08 Ravindra <rkumar@novell.com>
-
- * graphics.c: Added notes to GdipDrawXXX functions.
- * pen.c: We need to take into account the graphics->matrix
- also when stroking. Fixed the same.
-
-2004-06-04 Ravindra <rkumar@novell.com>
-
- * graphics.c: Fixed GdipDrawXXX functions as per the fix
- in pen.c.
- * pen.c: Added a flag to avoid multiple unnecessary setups
- of the same pen and fixed transform matrix usage.
- * gdip.h: Added a 'changed' bool type to GpPen struct.
-
-2004-06-04 Sanjay Gupta <gsanjay@novell.com>
-
- * bitmap.c: Resolved issue with saving of 24 bit bmps.
-
-2004-06-03 Ravindra <rkumar@novell.com>
-
- * graphics.c: Fixed GdipDeleteGraphics and
- gdip_graphics_attach_bitmap functions.
-
-2004-06-01 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Peformance improvements in some of diagonal
- hatch styles. These were quite slow earlier.
-
-2004-05-31 Ravindra <rkumar@novell.com>
-
- * graphics.c: Fixed GdipResetWorldTransform, GdipDrawPie and
- GdipFillPie. ResetWorldTransform should set the copy_of_ctm
- as well as the graphics->ct matrix to identity.
- Draw/FillPie functions do not do anything, if sweep angle is
- zero deg. This is done to fix the crash that we face when we
- draw/fill pie with zero deg sweep angle. And, some formatting.
-
-2004-05-28 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipResetWorldTransform): Remember to synchronize
- graphics->copy_of_ctm with the graphics' matrix.
-
-2004-05-28 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Completed the remaining hatch styles.
-
-2004-05-28 Jordi Mas <jordi@ximian.com>
- * tiffcodec.c, image.c: added support for saving TIFF files
-
-2004-05-28 Jordi Mas <jordi@ximian.com>
- * bitmap.c, image.c, tiffcodec.c: reformmated using Mono code style. No code
- changes made
-
-2004-05-28 Ravindra <rkumar@novell.com>
-
- * gdip.h: Added declarations for GdipDrawRectangles,
- GdipDrawRectanglesI, GdipFillRectangleI, GdipFillRectangles,
- GdipFillRectanglesI functions for Graphics.
- * graphics.c: Implemented the functions mentioned above. Added
- g_return_val_if_fail macro. Did some of formatting. I have
- tested this, hope I'm not going to break anything.
-
-2004-05-28 Ravindra <rkumar@novell.com>
-
- * graphics.c: Changed DrawLinesI and DrawLines functions not to
- call DrawLineI and DrawLine respectively, as it results in setting
- up pen so many times unnecessarily.
- * hatchbrush.c: Formatting.
-
-2004-05-27 Duncan Mak <duncan@ximian.com>
-
- * matrix.c (set_translate, set_scale, set_rotate, set_shear):
- Removed, we are not allocating a new GpMatrix * anymore.
- (TranslateMatrix, ScaleMatrix, RotateMatrix, ShearMatrix): All the
- functionality of set_foo has been moved back into here.
-
-2004-05-27 Miguel de Icaza <miguel@ximian.com>
-
- * pen.c (gdip_pen_setup): Fix indentation, and do not set the pen
- matrix. The pen matrix trumps any other transformations on the
- graphics->ct, someone must fix this properly.
-
- * matrix.c: Remove some heavy use of routines with something
- lighter, Duncan will look at this further.
-
-2004-05-27 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Implemented couple of hatch styles.
-
-2004-05-27 Jordi Mas <jordi@ximian.com>
- * pngcodec.c: added stubs for when libpng is not present
-
-2004-05-27 Sanjay Gupta <gsanjay@novell.com>
-
- * bmpcodec.c: Added support for converting 24BPP to 32 BPP
- for usage by cairo, in function for loading bmp.
-
-2004-05-27 Sanjay Gupta <gsanjay@novell.com>
-
- * bmpcodec.c: Abstracted reading bmp from file and stream
- to single function.
- * bmpcodec.h: Added function declarations for above implementation.
-
-2004-05-27 Jordi Mas <jordi@ximian.com>
- * bitmap.c: added support for drawing 24-bits images tru DrawImage
-
-2004-05-27 Sanjay Gupta <gsanjay@novell.com>
-
- * bmpcodec.c: Fixes in function to save bmp to stream.
-
-2004-05-26 Sanjay Gupta <gsanjay@novell.com>
-
- * bmpcodec.c: Implemented function to save bmp to stream.
- * bmpcodec.h: Added function declarations for above implementation.
-
-2004-05-26 Sanjay Gupta <gsanjay@novell.com>
-
- * bmpcodec.c: Resolved issue with saving images to bmp format.
-
-2004-05-26 Sanjay Gupta <gsanjay@novell.com>
-
- *image.c: Resolved issue with wrong comparison between image format
- guid and enocder clsid in GdipSaveImageToDelegate_linux() fn.
-
-2004-05-26 Jordi Mas <jordi@ximian.com>
- * gifcodec.c, gifcodec.h, image.c: implemented saving GIF images
- to file, stream and loading them from a stream.
-
-2004-05-26 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Implemented Plaid and Wave hatch styles.
-
-2004-05-26 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Implemented Sphere hatch style.
-
-2004-05-26 Jordi Mas <jordi@ximian.com>
- * bitmap.c, gdip.h: remove death code
- * gifcodec: no code changes made, reformmating to be able to work with it
-
-2004-05-25 Jordi Mas <jordi@ximian.com>
- * bitmap.c, gdip.h, image.c, imageattributes.c:
- - Implemented SetImageAttributesWrapMode: Tile, TileFlipY, TileFlipY
- and TileFlipXY
- - ImageAttributes fails to default category if nothing is setup
- - Minor bug fixes
-
-2004-05-25 Jordi Mas <jordi@ximian.com>
- * bitmap.c: fixes bug in gdip_bitmap_clone. We were not cloning the
- bitmap data itself
-
-2004-05-24 Jordi Mas <jordi@ximian.com>
- * bitmap.c, gdip.h, image.c, imageattributes.c: implemented
- functions for ImageAttributtes
-
-2004-05-21 Ravindra <rkumar@novell.com>
-
- * pen.c: We draw a line of a pixel width, if pen width is set
- to zero or less than zero.
-
-2004-05-20 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Implemented SolidDiamond hatch style.
- * pen.c: Minor fix in GdipSetPenDashArray function.
- * gdip.h: Added a comment and inserted #ifndef around
- uglify typedefs.
- * gdip_win32.h: Removed the mono dependency uglify.h.
- It was also breaking the build.
-
-2004-05-19 Miguel de Icaza <miguel@ximian.com>
-
- * gdip.h: Removed the dependency on Mono for uglify.h by
- copying here all the required things from mono/io-layer/uglify.h.
-
-2004-05-15 Vladimir Vukicevic <vladimir@pobox.com>
-
- * image.c, jpegcodec.c, jpegcodec.h, gdip.h: Add support for
- EncoderParameters. Currently, only jpeg Quality is exported (MS
- doesn't support any params for anything but Jpeg and Tiff)
-
- * image.c, gdip.h, gdipImage.h: Renamed some things which were
- clsid to format_guid to avoid confusion (they're not clsids)
-
-2004-05-14 Peter Bartok <pbartok@novell.com>
- * gdip.h: Added various missing structs and enumerations required for
- the new stubs.
- * bitmap.c: Removed warning; added missing stubs
- * font.c: Implemented GdipGetLogFontA, GdipPrivateAddMemoryFont
- * graphics.c: Implemented GdipSetInterpolationMode, GdipGetPageScale,
- GdipGetPageUnit; added missing stubs
- * imageattributes.c: Added missing stubs
- * image.c: Added missing stubs
-
-2004-05-14 Duncan Mak <duncan@ximian.com>
- * gdip.h (GpPathPointType): Make all the elements use hex values
- for consistency.
-
- * graphics-path.c (append): Handle the CloseSubpath flag. This is
- needed for SetPathMarker.
-
- * graphics-path.c (GdipClearPathMarkers, GdipSetPathMarker):
- Implemented.
- (GdipAddPathCurveI, GdipAddPathCurve2I, GdipAddPathCurve3I):
- Implemented. The float versions were committed a long time ago,
- but I forgot to do the same to the integer overrides.
-
- * graphics-path.c
- (GdipStartPathFigure, GdipClosePathFigure, GdipClosePathFigures)
- (GdipAddString, GdipWindingModeOutline):
- (GdipFlattenPath, GdipWidenPath, GdipWarpPath)
- (GdipGetPathWorldBounds, GdipIsVisiblePathPoint)
- (GdipIsOutlineVisiblePathPoint):
- Stubbed, they all now return Ok, but we have a MonoTODO comment to
- remind us to implement them.
-
-2004-05-14 Jordi Mas <jordi@ximian.com>
- * adjustablearrowcap.c ,customlinecap.c, gifcodec.c, graphics-path,
- hatchbrush.c, jpegcodec.c, lineargradientbrush.c, matrix.c,
- pathgradientbrush.c, pngcodec.c,texturebrush.c,tiffcodec.c:
- added missing licenses.
-
-2004-05-14 Jordi Mas <jordi@ximian.com>
- * bmpcodec.c, gifcodec.c, jpegcodec.c, pngcodec.c, tiffcodec.c:
- remove redudant CLSID definitions and use global definitions
-
-2004-05-14 Ravindra <rkumar@novell.com>
-
- * Makefile.am: Added source file entries for customlinecap and
- adjustablearrowcap.
- * pen.c: A minor fix in SetPenDashArray () function.
-
-2004-05-14 Ravindra <rkumar@novell.com>
-
- * adjustablearrowcap.c: First implementation of AdjustableArrowCap.
-
-2004-05-14 Ravindra <rkumar@novell.com>
-
- * customlinecap.[ch]: First implementation of CustomLineCap.
- It needs further work. I need to get it working with pen.
-
-2004-05-14 Ravindra <rkumar@novell.com>
-
- * gdip.h: Added missing functions for Pen. Added compound
- array to GpPen struct. Fixed some of Pen function signatures.
- Moved around few enums for compilation. Added typedefs and
- functions for CustomLineCap and AdjustableArrowCap.
- * pen.c: Added compound array functions. Fixed dash array
- functions and added stubs for custom linecaps.
-
-2004-05-13 Jordi Mas <jordi@ximian.com>
- * does a proper pixelformat check
-
-2004-05-13 Ravindra <rkumar@novell.com>
-
- * gdip.h: Added GpPenType enum and moved GpBrushType enum here
- from brush.h. Added GdipGetPenFillType function declaration.
- * brush.h: Moved GpBrushType enum to gdip.h.
- * pen.c: Implemented GdipGetPenFillType function.
-
-2004-05-12 Peter Bartok <pbartok@novell.com>
- * pngcodec: Since the code handles interlace just fine I removed the
- error condition for interlaced pictures; this fixes bug #55934
-
-2004-05-12 Peter Bartok <pbartok@novell.com>
- * font.c: Implemented GdipCreateFontFromDC
-
-2004-05-12 Duncan Mak <duncan@ximian.com>
-
- * gdip.h (GpCoordinateSpace): Defined.
-
- * graphics.c (GdipScaleWorldTransform): Implemented.
- (GdipSetWorldTransform): Fixed memory management bug
- pointed out by Vlad.
-
-2004-05-12 Miguel de Icaza <miguel@ximian.com>
-
- * image.c (GdipLoadImageFromFile): Added error checking in case
- the codec fails to load a valid image.
-
-2004-05-12 Jordi Mas i Hernandez <jordi@ximian.com>
- * bitmap.c, image.c, gdpi.h:
- - Correct support for Format24bppRgb, Format32bppArgb, Format32bppPArgb,
- Format32bppRgb pixel formats
- - Fixed GdipBitmapLockBits to return the format and behavior than
- GDI+
- - GetPixel/SetPixel do not work when the bitmap is locked
-
-2004-05-10 Peter Bartok <pbartok@novell.com>
- * gdip_win32.c: Added ObjectList to manage Win32 object that can be
- deleted. Solves problem of asynchronous deletion of object when
- GC kicks in. While we could also use Control.BeginInvoke this method
- allows us to keep private gdip handles away from System.Drawing.
- Currently handles fonts but any other object that could be subject
- to GC should also be managed through the ObjectList code.
- * gdip.h: Added prototype
- * general.c: Shutdown code now also calls the new gdip_win32 shutdown
- function.
-
-2004-05-10 Duncan Mak <duncan@ximian.com>
-
- * gdip.h (fcmp): Added.
-
- * general.c (fcmp): Use the fcmp function from fcmp.sf.net.
-
- * graphics-path.c (append): Check for point count before calling
- GetPathLastPoint. Use fcmp instead of == when comparison floating
- point numbers.
-
-2004-05-09 Peter Bartok <pbartok@novell.com>
- * graphics.c: Completely rewrote DrawString and MeasureString:
- - No longer only works for us-ascii
- - Now handles multiple sequential linefeeds in DrawString
- - Now properly calculates the bounding box size
- - Now handles StringFormat flags (NoWrap, Vertical, Ellipsis)
- - Now properly breaks lines at whitespace or characters
- - Now properly handles tabstops
- - Now properly allows multiple hotkey characters
- * stringformat.c: Changed trimming default to TrimWord (like MS)
- * gdip.h: Fixed DrawString prototypes, replaced DrawString support structs
-
-2004-05-09 Jordi Mas i Hernandez <jordi@ximian.com>
- * bmpcodec.c: Move BMP specific functions to bmpcodec
- * bitmap.c: Move BMP specific functions to bmpcodec
-
-2004-05-07 Ravindra <rkumar@novell.com>
-
- * hatchbrush.c: Implemented 11 hatching styles.
- * texturebrush.c: Fixed destroy function.
-
-2004-05-04 Jordi Mas i Hernandez <jordi@ximian.com>
- * bmpcodec.c: We use always RGB32 internally
- * bitmap.c: We use always RGB32 internally
- * image.c: We use always RGB32 internally
-
-2004-05-06 Sanjay Gupta <gsanjay@novell.com>
-
- * image.c: Removed a printf stmt.
- * gifcodec.c: Implemented reading information about time and page
- based frames.
-
-2004-05-05 Peter Bartok <pbartok@novell.com>
- * gdip_win32.c: Added support for SetMapMode; fixed fontsize conversion
- for Cairo->Wine fonts
- * font.c: Added call to SetMapMode to have predictable units for font size
- * gdip_win32.h: Added support for SetMapMode
-
-2004-05-04 Jordi Mas i Hernandez <jordi@ximian.com>
- * bitmap.c: calculate strides as GDI+
-
-2004-05-05 Sanjay Gupta <gsanjay@novell.com>
-
- * gdipImage.h: Added CLSID for FrameDimensions.
- * image.c: FrameDimensionsCount, FrameDimensionList and ImageFrameCount
- taken into consideration while loading image.
- * gifcodec.c: Corrected implementation of reading no of image
- description records present.
-
-2004-05-04 Sanjay Gupta <gsanjay@novell.com>
-
- * image.c: Implemented functions GdipImageGetFrameDimensionsCount(),
- GdipImageGetFrameDimensionsList(), GdipImageGetFrameCount(). UNTESTED
- * gdip.h: Modifieid GpImage structure and added FrameDimensionInfo struct.
- * gifcodec.c: Modified to read the no of image description records present.
-
-2004-05-04 Jordi Mas i Hernandez <jordi@ximian.com>
- * image.c: implements GdipImageRotateFlip: 90, 180, 270,
- degree, plus FlipX and combinations
-
-
-2004-05-04 Ravindra <rkumar@novell.com>
-
- * matrix.c: Added macros for checking null pointers.
-
-2004-05-04 Ravindra <rkumar@novell.com>
-
- * pen.c: Added assert macros for checking null pointers. Also fixed
- Get/Set/Reset PenTransform functions.
- * graphics.c: Fixed a mistake in Clear function. Cairo takes color
- values in the range [0.0, 1.0], instead of [0, 255].
- * gdip.h: Added return type to gdip_pen_setup function.
- * lineargradientbrush.[ch]: Fixed Get/Set LineTranform functions.
- * texturebrush.c: Fixed Get/Set TextureTransform functions.
-
-2004-05-03 Jordi Mas i Hernandez <jordi@ximian.com>
- * bitmap.c: adds Format32bppRgb support for get/set pixel
- * graphics.c: fixes bug 56798 (RTL support)
-
-2004-05-03 Jordi Mas i Hernandez <jordi@ximian.com>
- * bitmap.c: fixes stride in GdipCloneBitmapAreaI, copy of different
- pixel formats, uninit data in Bitmap struct, etc.
-
-2004-04-30 Ravindra <rkumar@novell.com>
-
- * lineargradientbrush.[ch]: Few fixes.
-
-2004-04-30 Jordi Mas i Hernandez <jordi@ximian.com>
- * region.c: fixes bug at GdipSetInfinite detected by the tests
-
-2004-04-30 Jordi Mas i Hernandez <jordi@ximian.com>
- * bitmap.c: fixes bug causing a cloned imaged not been able to
- save it.
-
-2004-04-29 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (append): Moved the aforementioned logic into
- here instead; append_point should still just only delegate to
- append.
-
-2004-04-29 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (append_point): Add some logic here. Don't
- append a move_to (PathPointTypeStart) if we're already at the
- point we need to be in. This fixes problems we have with filling,
- as Cairo closes all subpaths before a fill op.
- (GdipAddPathLine, GdipAddPathLineI): Removed precaution checks for
- move_to, we're doing it once and for all in append_point.
-
- This should fix the drawing bug Miguel sees in the GraphicsPath
- in the test form.
-
-2004-04-29 Peter Bartok <pbartok@novell.com>
-
- * gdip.h: Added flag for multiline strings
-
- * graphics.cs: Fixed bug #56800, DrawString now handles \n (and
- ignores \r, like Microsoft)
-
-2004-04-29 Jordi Mas i Hernandez <jordi@ximian.com>
- * image.c: fixes GdipSaveImageToFile using FormatID as parameter
- instead of the coded Clsid
-
-
-2004-04-28 Jordi Mas i Hernandez <jordi@ximian.com>
- * bmpcodec.c: added codecInfo
- * gdip_win32.h: added ImageCodecInfo struct
- * general.c: init codecinfo
- * gifcodec.c: added codecInfo
- * image.c: added GDI+ encoder/decoder functions
- * jpegcodec.c: added codecInfo
- * pngcodec.c: added codecInfo
- * tiffcodec.c: added codecInfo
-
-2004-04-27 Ravindra <rkumar@novell.com>
-
- * lineargradientbrush.[ch]: First implementation of
- lineargradientbrush.
- * Makefile.am: Added lineargradientbrush sources to the list.
-
-2004-04-27 Vladimir Vukicevic <vladimir@pobox.com>
-
- * gdip.h: Added EncoderParameterValueType enum
-
- * image.c (GdipDrawImageRectRect, GdipDrawImagePoints): implemented.
- (gdip_encoder_parameter_search_int): start of some encoder
- parameter stuff
-
-2004-04-26 Duncan Mak <duncan@ximian.com>
-
- * general.c (gdip_open_curve_tangents):
- (gdip_closed_curve_tangents):
- Simplified. Use only one coefficient, instead of a set of
- coefficients per each point on the curve. We now take care of
- tension when calculating tangents.
- (gdip_calculate_coefficients): Removed. Microsoft doesn't use such
- a nice way of calculating coefficients. Their implementation is a
- lot more simplistic.
-
- Thanks to Professor Rasala for figuring this out.
-
- * graphics.c (GdipDrawClosedCurve2, GdipDrawCurve3)
- (GdipFillClosedCurve2): Add tension paramater.
-
- * graphics-path.c (GdipAddPathCurve3): Implemented.
- (GdipAddPathCurve, GdipAddPathCurve2): Pass the work onto
- GdipAddPathCurve3.
-
- * gdip.h (gdip_closed_curve_tangents, gdip_open_curve_tangents):
- Updated function signature to include tension.
-
-2004-04-26 Sanjay Gupta <gsanjay@novell.com>
- * image.c: Implemented function GdipGetImageRawFormat.
- * gdip.h: Modifieid GdipImage structure and added ImageFormat
- enum from gdipImage.h
- * gdipImage.h: Removed ImageFormat enum to gdip.h
-
-2004-04-25 Vladimir Vukicevic <vladimir@pobox.com>
-
- * graphics.c (GdipCreateFromXDrawable_linux): added method, so that
- we can interface with Gtk (i.e. to draw to a DrawingArea)
-
-2004-04-24 Ravindra <rkumar@novell.com>
-
- * graphics.c: Fixed GdipGraphicsClear() function.
- * gdip.h: Removed some unwanted lines.
-
-2004-04-23 Vladimir Vukicevic <vladimir@pobox.com>
-
- * bitmap.c (GdipCloneBitmapAreaI): wrong sense of assert test,
- oops
-
- * image.c (GdipDrawImagePoints): implemented.
-
-2004-04-23 Peter Bartok <pbartok@novell.com>
- * graphics.c: Fixed bug #57551. Hotkey prefix now properly placed
- no matter on what line it is or how the text is aligned.
-
-2004-04-23 Peter Bartok <pbartok@novell.com>
- * graphics.c: Implemented GdipCreateFromHWND()
-
-2004-04-22 Vladimir Vukicevic <vladimir@pobox.com>
-
- * bitmap.c (GdipCloneBitmapAreaI): implemented with format
- conversion
-
- * image.c (GdipDrawImageRect): use gdip_bitmap_ensure_surface
- to create a surface if it's missing. Fixes 57323
-
- * bitmap.c (gdip_bitmap_ensure_surface): added as a way to access
- a bitmap image's surface, creating it if it's missing
-
-2004-04-21 Peter Bartok <pbartok@novell.com>
- * font.c: Added private GdipCreateFontFromHfont function to support
- the System.Drawing.Font.FromHfont method.
- * gdip_win32.c: Added import of Wine GetTextMetrics and GetTextName
- functions
- * gdip_win32.h: Added some prototypes and LOGFONTA and TEXTMETRICA
- structures
-
-2004-04-19 Sanjay Gupta <gsanjay@novell.com>
- * image.c: Added function call to load bmp image from stream in
- switch case stmt.
-
-2004-04-20 Jordi Mas i Hernandez <jordi@ximian.com>
-
- * region.c - more work on regions. New methods, fixes, and funtionality
- * graphics.c - Fixed font bug
- * gdip.h - new region functions
-
-2004-04-19 Vladimir Vukicevic <vladimir@pobox.com>
-
- * graphics-path.c (GdipAddPathStringI): renamed GdipPathString ->
- GdipAddPathString (the real name); still NotImplemented
-
- * bitmap.c: Implemented new LockBits/UnlockBits that's consistent
- with MS semantics, and that can do conversions. (Also some random
- whitespace cleanup, mainly as I touched functions.)
-
- * gdip.h: Some ARGB access macros, also a cleanup of the PixelFormat
- enum (there is a method to the madness). Some missing prototypes also.
-
- * image.c: Got rid of unused gdip_getpixel_formatsize (it can be inferred
- from the pixel format).
-
- * pathgradientbrush.c: Sets the cairo rgb color to the center color of the
- gradient. Not pretty, but better than nothing.
-
- * Makefile.am: Added -Wall -Wno-unused -Wno-format. Lots of
- functions that should have been returning values weren't,
- functions used without prototypes, etc. Touched files to fix
- missing return issues: bmpcodec.c, brush.h, font.c, gdip_win32.h,
- general.c, graphics.c, hatchbrush.c, imageattributes.c,
-
-2004-04-19 Sanjay Gupta <gsanjay@novell.com>
- * bmpcodec.c: Fixed function for loading image from stream
-
-2004-04-16 Jordi Mas i Hernandez <jordi@ximian.com>
-
- * region.c - more work on regions. New methods, fixes, and funtionality
- * graphics.c - GdipFillRegion implemented
-
-2004-04-16 Ravindra <rkumar@novell.com>
-
- * gdip.h: Included glib.h.
- * brush.h, solidbrush.h: Removed internal functions and added
- return type to vtable functions.
- * brush.c: Now we return status from internal functions also.
- * texturebrush.c, hatchbrush.c, solidbrush.c, pathgradientbrush.c:
- Now we return status from internal functions also and do check for
- null pointers.
-
-2004-04-16 Sanjay Gupta <gsanjay@novell.com>
- * bmpcodec.c: Implemented function for loading image from stream
-
-2004-04-15 Ravindra <rkumar@novell.com>
-
- * general.c (gdip_cairo_set_surface_pattern): Check for null pattern
- and return the status.
- * gdip.h (gdip_cairo_set_surface_pattern): Return status.
-
-2004-04-15 Ravindra <rkumar@novell.com>
-
- * hatchbrush.h: Moved internal functions to hatchbrush.c.
- * hatchbrush.c: Moved some internal functions around.
-
-2004-04-15 Ravindra <rkumar@novell.com>
-
- * texturebrush.h: Moved internal functions to texturebrush.c.
- * texturebrush.c: Few fixes to handle scale/rotate functions. But,
- we still don't get scaling/rotation right. Seems to be some problem
- with Cairo. Checking in code now, will see this later when I'm sure
- that Cairo is doing right.
-
-2004-04-14 Jordi Mas i Hernandez <jordi@ximian.com>
-
- * bitmap.c - fixes biXPelsPerMeter fields
-
- * bmpcodec.c - fixes strides, fixes new WinNT BMP headers,
- support for OS/2 bitmaps, 8 and 24 bits, upside bitmaps, gets
- different pixelformats correct loading/saving, reformatted to 8
- tabs, support for load/save palette if present (RGBTRIPLE and
- SQUADS), fixes bitmap writting to allow to work with more tools
- (saving it upside down), etc.
-
-2004-04-14 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (GdipAddPathLine, GdipAddPathLineI): Only append
- a starting point if the current point is not the same as the point
- we're appending. This removes unnecessary subpaths, and fixes
- GdipFillPath.
-
-2004-04-13 Vladimir Vukicevic <vladimir@pobox.com>
-
- * jpegcodec.c (gdip_save_jpeg_image_internal): Check for pixformat
- equal to Format24bppRgb, not 32bpp when deciding whether to do
- argb conversion. Fixes #56967.
-
- * texturebrush.h: Moved WrapMode enum to gdip.h, to share
- it with the pgbrush
-
- * general.c (gdip_rect_expand_by): Helper function to
- build bounding rects
-
- * gdip.h: Bunch of new prototypes
-
- * pathgradientbrush.c: Stub implementations of this. Real version
- will probably require me to add gouraud triangle shading to cairo,
- which will happen Real Soon Now.
-
-2004-04-12 Vladimir Vukicevic <vladimir@pobox.com>
-
- * gdip.h, image.c: I misread the *I methods. Implement
- them correctly, keeping the corrent int/float distinction.
- Also added a bunch of GdipDrawImage* stubs.
-
-2004-04-11 Vladimir Vukicevic <vladimir@pobox.com>
-
- * general.c (GdiplusStartup): I really meant $GDIPLUS_NOX
- to mean "no X" instead of "require X".
-
- * texturebrush.c, image.c: Use gdip_cairo_set_surface_pattern
-
- * general.c: (gdip_cairo_set_surface_pattern) helper function
- to create a new pattern from a surface and set it.
- (GdiplusStartup): Don't acquire an X display if GDIPLUS_NOX is set
- (gdip_get_display_dpi): use GDIP_display instead of creating a new
- XDisplay
-
-2004-04-10 Vladimir Vukicevic <vladimir@pobox.com>
-
- * gdip.h, graphics.c: Added lots of Get/Set stuffs.
-
-2004-04-12 Ravindra <rkumar@novell.com>
-
- * texturebrush.h: Internal functions should not appear here.
- Removed internal functions. Uncommented few implemented functions.
- * texturebrush.c: Moved around few functions as per the change
- in header file.
-
-2004-04-11 Peter Bartok <pbartok@novell.com>
- * gdip_win32.c: Added fontsize translation when creating HFONT
- * font.c: Added private function to retrieve the HFONT handle
-
-2004-04-10 Vladimir Vukicevic <vladimir@pobox.com>
-
- * image.c (GdipDrawImageRectI): put back version that handles
- scaling correctly and doesn't create an extra graphics context
- unnecessarily.
-
- * graphics.c (gdip_graphics_attach_bitmap): set the surface on a
- GpBitmap after setting it as the cairo target; each GpBitmap
- should always have an associated cairo surface. (fixes #56803)
-
- * image.c (gdip_image_init): can't call get_display_dpi(), because
- we might not have an X display at all.
-
-2004-04-10 Peter Bartok <pbartok@novell.com>
- * bitmap.c: Removed the hack that set the Win32 bitmap to white.
- Instead it now simulates alpha blending and merges the Win32
- bitmap onto the cairo image surface. This makes drawing between
- cairo and Wine/Win32 fully compatible, albeit with two
- drawbacks: First, the copying of the bitmap is done pixel by
- pixel, and second, the color value of UNALTERED_PIXEL in
- a Win32 bitmap will be treated as transparent.
-
- * image.c: Removed the 'improved' GdipDrawImageRectI function. I lost a
- whole day tracking down why SWF stopped working. The 'improved'
- version doesn't seem to work (yet). Left the broken version
- with an #if 0 for future fixing.
-
- * gdip_win32.c: Added functions to create/delete HFONT handles tracking
- the cairo fonts.
-
- * gdip_win32.h: Added prototypes
-
- * font.c: Now also creates/deletes Wine font tracking the cairo font
-
- * gdip.h: Added HFONT element to GpFont structure
-
-2004-04-10 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipDrawCurve):
- (GdipDrawClosedCurve, GdipFillClosedCurve): Added all the
- overloads, properly delegate the work to avoid code
- duplication. Handle the case when tension = 0; in that case, we
- draw/fill a polygon for closed curves, and just draw straight
- lines for open curves.
- (GdipDrawCurve3): Fixed signature, there was a missing offset
- argument.
-
- * gdip.h: Added open and closed curve drawing and filling
- functions.
-
-2004-04-10 Duncan Mak <duncan@ximian.com>
-
- * general.c (gdip_open_curve_tangents): Fixed some more errors in
- the porting of the algorithm. We should be passing Z to
- gdip_calculate_coefficients instead of count. Z = 2 * count - 1.
-
-2004-04-10 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipDrawCurve): Doh! Use the ask for tangents for
- open curves, not closed curves.
-
- * graphics-path.c (GdipResetPath): Don't set them to NULL. That
- wouldn't work, doofus.
-
- * graphics.c (GdipDrawCurve2I): Fixed function signature and use
- convert_points to pass the work onto GdipDrawCurve2.
- (GdipDrawCurve3I): Fixed function signature.
-
- * general.c (gdip_open_curve_tangents): Fix typo.
-
-2004-04-09 Peter Bartok <pbartok@novell.com>
- * Makefile.am: Added region.c to list of sourcefiles
-
-2004-04-09 Jordi Mas i Hernandez <jordi@ximian.com>
- * region.c - fixes to regions
-
-2004-04-09 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (append_curve): Moved it to the top along with
- the other append helper functions.
- (GdipAddPathCurve, GdipAddPathCurveI): Implemented using
- gdip_open_curve_tangents.
- (GdipAddString): Fixed signature.
-
- * general.c (gdip_open_curve_tangents): Implemented.o
- (gdip_closed_curve_tangents): Fixed memory leak here.
-
- * gdip.h (gdip_open_curve_tangents): Add here. To be shared
- between graphics.c and graphics-path.c.
-
-2004-04-08 Jordi Mas i Hernandez <jordi@ximian.com>
- * region.c - Started regions implementation
- * gdip.h - signature changes
-
-2004-04-07 Ravindra <rkumar@novell.com>
-
- * texturebrush.[ch]: Added the missing functionality of clipping
- a rectangle out of image provided.
-
-2004-04-06 Vladimir Vukicevic <vladimir@pobox.com>
-
- * jpegcodec.c (gdip_save_jpeg_image_internal):
- remove stray JCS_GRAYSCALE setting, which was generating
- very bizzare images.
-
- * jpegcodec.c, pngcodec.c: Allow reading/writing non-RGBA data.
- The GpBitmap.data struct holds cairo-compatible data (always 32bpp
- RGBA), whereas the GpImage.pixFormat field holds what this data is
- actually supposed to be (i.e. grayscale). Still no support for
- colormapped images.
-
-2004-04-07 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_pie): Retort to make_ellipse *after* drawing
- the line.
-
-2004-04-06 Vladimir Vukicevic <vladimir@pobox.com>
-
- * jpegcodec.c (gdip_save_jpeg_image_internal): implement
- jpeg saving, both files and streams. Format options are
- ignored for now.
-
- * image.c (GdipSaveImageToFile,
- (GdipSaveImageToDelegate_linux): add JPEG
-
- * image.c (gdip_get_pixel_format_components): added function
-
- * jpegcodec.c (gdip_load_jpeg_image_internal): add missing
- jpeg_destroy_decompress()
-
-2004-04-06 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_arc): Just follow what I did with GraphicsPath
- and use a boolean flag instead of doing FP comparison. It's not
- worth it.
-
-2004-04-06 Vladimir Vukicevic <vladimir@pobox.com>
-
- * gdip.h: Added stream handling delegate prototypes,
- and some missing function protos
-
- * gdipImage.h: stream delegate loading/saving functions
-
- * image.c: stream loading/saving bits, implemented
- via linux-specific delegates. Added guids for various
- file formats, and a gdip_image_format_for_clsid()
- helper function
-
- * jpegcodec.c: supports reading from a stream
-
- * pngcodec.c: supports writing; also supports
- reading/writing with a stream
-
- * image.c: blit surface directly for painting images,
- instead of creating a graphics context for it first
-
- * gifcodec.c, jpegcodec.c, pngcodec.c, tifcodec.c:
- Write data with the correct flags and resolution bits,
- to (almost) match what win32 outputs
-
-2004-04-04 Vladimir Vukicevic <vladimir@pobox.com>
-
- * gifcodec.c, tiffcodec.c, pngcodec.c: include config.h, which
- actually enables this code.. so that the glaring bugs as a result
- of it never having been compiled before can be fixed. *cough*
-
- * image.c (GdipDrawImageRectI): do correct scaling
- if source and dest width/height don't match.
- (GdipLoadImageFromFile): fseek back to the start
- before passing to the loader.
-
-2004-04-04 Vladimir Vukicevic <vladimir@pobox.com>
-
- * image.c: Changed loader calls to use correct
- load prototypes
-
- * pngcodec.c, gifcodec.c: Implemented png and gif loading
-
- * gdip.h: Changed ColorPalette to match GDI+; Entries is part
- of the allocated struct, not a separate pointer. Also
- added some ARGB convenience macros.
-
- * bmpcodec.c, bmpcodec.h: Updated load prototypes to match
- usage
-
-2004-04-04 Vladimir Vukicevic <vladimir@pobox.com>
-
- * src/image.c, src/gdip.h: Added GdipDrawImage/DrawImageRect
-
- * src/jpegcodec.c, src/tiffcodec.c: Implemented loading jpeg and
- tiff images. Need to test these out on windows, to see exactly
- what formats stuff gets retruned in, but I think we should be ok
- for the most common cases. No file saving yet.
-
- * src/bmpcodec.c, src/gifcodec.c, src/pngcodec.c:
- Remove calls to bogus (and undefined) gdip_image_new()
-
-2004-04-04 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_curve): Renamed from
- gdip_make_closed_curve. Added a new _CurveType argument.
- (convert_points): Moved to general.c, as it's used in
- graphics-path.c as well.
-
- * graphics-path.c (append_curve): Add a _CurveType
- argument. Renamed from gdip_append_closed_curve for consistency.
- (GdipAddPathClosedCurve2I): Hook it up.
-
- * general.c (convert_points): Moved here from graphics.c
- (gdip_open_curve_tangents): Declare here. No code yet, need to
- investigate end tangents.
-
- * gdip.h (_CurveType): New (private) enum for distinguishing open
- and close curves.
-
-2004-04-04 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (append_arc): Added a new boolean argument. to
- determine if we're continuing an existing curve.
-
-2004-04-04 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_arc): Only call move_to when we're not already at
- that point. This fixes FillPie, as cairo_fill implicitly closes
- all subpaths before filling. The extraneous move_to call earlier
- was causing Cairo to close early.
- (make_pie): Removed the debug messages.
-
-2004-04-02 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_pie, GdipDrawArc): If the delta is greater than
- or equal to 360 degrees, then we're effectively drawing an
- ellipse, so make it do so.
-
-2004-04-02 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipFillPieI, GdipDrawPieI): Instead of having
- another copy of the code, just use the float equivalent.
- (GdipDrawPie): Add restore/save pair.
- (make_pie): This is broken right now. Added some debugging
- messages.
-
-2004-04-01 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipFillClosedCurve, GdipFillClosedCurveI):
- Implemented.
-
-2004-04-02 Ravindra <rkumar@novell.com>
- * texturebrush.c: Implemented TileFlipXY wrapmode.
-
-2004-04-01 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (convert_points): New helper function to turn a list
- of GpPoints into GpPointFs.
- (GdipDrawClosedCurveI): Implemented using convert_points, then
- just call GdipDrawClosedCurve.
-
-2004-04-01 Duncan Mak <duncan@ximian.com>
-
- Implemented drawing ClosedCurves in Graphics and GraphicsPath.
-
- These functions are implemented with the help of Prof. Rasala at
- Northeastern University. The algorithm is described in:
-
- Richard Rasala, Explicit Cubic Spline Interpolation Formulas,
- in Andrew S. Glassner, Graphics Gems, Academic Press, 1990,
- 579-584.
-
- Remaining TODO: Finish open curves and consider tension.
-
- * graphics.c (gdip_make_closed_curve): Translates vertices
- and tangents for cairo_curve_to.
- (GdipDrawClosedCurve): Implemented.
-
- * graphics-path.c (gdip_append_closed_curve): Translates vertices
- and tangents into append_bezier.
- (GdipAddPathClosedCurve2): Implemented.
-
-2004-04-01 Duncan Mak <duncan@ximian.com>
-
- * gdip.h: Added the new functions for calculating tangents.
- (CURVE_MIN_TERMS, CURVE_MAX_TERMS): Constants used in tangent
- calculations.
-
- * general.c (gdip_calculate_coefficients)
- (gdip_closed_curve_tangents): Two helper functions for drawing
- closed curves.
-
-2004-03-30 Sanjay Gupta <gsanjay@novell.com>
- *pngcodec.c Implemented one more method.
- *gdip.h Modified ColorPalette structure.
-
-2004-03-31 Sachin Kumar <skumar1@novell.com>
- * Makefile.am: Updated file to make it work for
- 'make distcheck'.
-
-2004-03-30 Jordi Mas i Hernandez <jordi@ximian.com>
- * image.c - GdipGetImageBounds and fixes
- * bitmap.c - keep the witdh, height and pixel format in sync with the image struct
-
-2004-03-30 Sanjay Gupta <gsanjay@novell.com>
- *pngcodec.c Added crc check
- *pngcodec.h Added crc check
-
-2004-03-28 Sanjay Gupta <gsanjay@novell.com>
- * pngcodec.c implementing png encoder
- * pngcodec.h implementing png encoder
-
-2004-03-26 Duncan Mak <duncan@ximian.com>
-
- * graphics.c: Prepare for the Curve and CloseCurve work by
- stubbing out some functions.
-
- * graphics.c (gdip_plot_path): Fixed the handling of paths
- containing PathPointTypeBezier points. Previously, we were
- resetting the index to zero at the head of each loop, so we were
- never drawing Bezier curves correctly. Also, we need to draw the
- curve immediately once we've stored 3 points, instead of waiting
- till the next iteration (which may never come). This is an
- off-by-one error.
-
- * graphics-path.c (append_arc): Use floats instead of ints to hold
- the center points, use doubles to hold the trig points.
-
-2004-03-26 Jordi Mas i Hernandez <jordi@ximian.com>
- * image.c - dpis and parameter checking
-
-2004-03-26 Ravindra <rkumar@novell.com>
- * texturebrush.c: Implemented TileFlipY wrapmode and fixed
- TileFlipX wrapmode.
-
-2004-03-26 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c: Port the changes made to graphics here.
- (append_arc): New function, modeled after make_arc for appending
- arcs (a set of Bezier points) to the Path.
- (GdipAddPathArc): Calculate the middle angle correctly and call
- append_arc.
- (GdipAddPathPie): Removed duplication, call append_arc
- appropriately.
-
-2004-03-26 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (make_arc): Use the end angle instead of the sweep
- angle. Previously, the code was misbehaving because I used the
- sweep angle as the end angle.
- (make_pie, DrawArc): Determine the middle angle correctly in cases
- where the delta > 180. Even though this sounds simple, it took a
- long time for me to figure out.
- (make_pie): Simplifed things a bit. Instead of replicating most of
- the arc-drawing algorithm here, use of make_arc instead. This reduced
- some of the duplicates in the code.
- (DrawArcI): I'm tired on maintaining so many copies of the same
- code, so just call DrawArc now.
-
- With this patch, we should be drawing Arcs and Pies correctly.
-
-2004-03-25 Ravindra <rkumar@novell.com>
- * texturebrush.[ch]: Fixing texture brush. Still needs
- some work.
-
-2004-03-24 Jordi Mas i Hernandez <jordi@ximian.com>
- * imageattributes.c - created and first methods
-
-2004-03-23 Peter Bartok <pbartok@novell.com>
- * gdip_win32.h: Added definitions for Wine X11DRV_ExtEscape function;
- removed definition and reference to internal wine structures
- * gdip_win32.c: Added import of X11DRV_ExtEscape to allow pulling the X11 Drawable without
- knowledge of internal structures
- * graphics.c: Now uses the X11DRV_ExtEscape function to retrieve the drawable from Wine
- * general.c: Made x11drvHandle accessible for other source files (needed for X11DRV_ExtEscape)
-
-2004-03-23 Ravindra <rkumar@novell.com>
- * gdip.h: Changed file format to Unix.
-
-2004-03-22 Jordi Mas i Hernandez <jordi@ximian.com>
- * graphics.c: added GdipFillPieI and GdipFillPie
-
-2004-03-22 Sanjay Gupta <gsanjay@novell.com>
- * gdip.h: Typo error
- * gdipImage.h: Fixed issue because of typo
- * image.c: Fixed issue because of typo
-
-2004-03-21 Sanjay Gupta <gsanjay@novell.com>
- * Makefile.am: Included codec files.
- * gdip.h: Added few structure definitions.
- * gdipImage.h: Included codecs .h files.
- * image.c: Work on codecs.
-
-2004-03-18 Miguel de Icaza <miguel@ximian.com>
-
- * graphics.c (GdipDrawString): Fixed what looked like a typo X and
- Y.
-
- (GdipFillPath): Implement this routine. Factor code
- into gdip_plot_path.
-
- Stub out a few more routines to avoid crashes when running.
-
-2004-03-18 Peter Bartok <pbartok@novell.com>
- * pen.c: Fixed leak and bug that returned wrong pointer for dash array
-
-2004-03-15 Jordi Mas i Hernandez <jordi@ximian.com>
- * graphics.c - Bug fixing, suport for hotkeys, code reoganisation
- * stringformat.c - string format tab support
-
-2004-03-11 Peter Bartok <pbartok@novell.com>
- * bitmap.c: Added temporary hack to always initialize the bitmap scan (pixel) data (for SWF)
-
-2004-03-10 Ravindra <rkumar@novell.com>
- * hatchbrush.c: Coding style fixes.
-
-2004-03-10 Ravindra <rkumar@novell.com>
- * hatchbrush.h: Modified few internal function signatures.
- * hatchbrush.c: Implemented couple of hatching styles.
-
-2004-01-10 Alexandre Pigolkine <pigolkine@gmx.de>
- * bitmap.c
- * gdip.h GdipBitmapData struct. Memory ownership
- stored in Reserved field
- * general.c small fix
-
-2004-03-08 Ravindra <rkumar@novell.com>
- * hatchbrush.c: Implemented cross hatch style.
- * hatchbrush.h: Modified a function signature.
-
-2004-03-08 Ravindra <rkumar@novell.com>
- * solidbrush.c: cairo_set_rgb_color bug fix.
- * hatchbrush.c: cairo_set_rgb_color bug fix.
-
-2004-03-07 Sanjay Gupta <gsanjay@novell.com>
- * gdip.h: Included ImageFlag enum and moved certain enums from
- gdipImage.h
- * gdipImage.h: Moved few enums to gdip.h
- * image.c: Implemented few functions
-
-2004-03-06 Ravindra <rkumar@novell.com>
- * pen.c: Indentation.
- * solidbrush.c: Coding style.
- * hatchbrush.c: Coding style and removed printf.
-
-2004-03-05 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (GdipAddPathPath): Fix index, it should be 0,
- not 1.
- (GdipAddPathPolygon): Add a line back to the starting point to
- complete the polygon if the first and last points are not the same.
-
-2004-03-04 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (GdipAddPathPath): Implemented.
-
-2004-03-04 Jordi Mas i Hernandez <jordi@ximian.com>
- * stringformat.c - DigitSubstitution and TabStob methods
-
-2004-03-03 Miguel de Icaza <miguel@ximian.com>
-
- * gdip_win32.c (_load_gdi32, _load_user32): Use the
- _WINE_SHAREDLIB_PATH environment variable to locate our dynamic
- libraries.
-
- * general.c (_load_x11drv): Load the library from the special
- location provided by the Wine init function.
-
-2004-03-03 Jordi Mas i Hernandez <jordi@ximian.com>
- * stringformat.c - coding style
-
-2004-03-02 Jordi Mas i Hernandez <jordi@ximian.com>
- * graphics.c - Implemented font strikeout and underline
- * font.c - Implemented font strikeout and underline, allows multiple attributes
-
-2004-03-01 Sanjay Gupta <gsanjay@novell.com>
- * bitmap.c: Access modification in Get/Set Pixel()
-
-2004-02-29 Ravindra <rkumar@novell.com>
- * hatchbrush.c: Implemented four vertical hatching styles
- and did few comment improvements.
-
-2004-02-28 Miguel de Icaza <miguel@ximian.com>
-
- * font.c: Coding style, ANSI-C-ification
-
- * Makefile.am: Add -ansi, -pedantic and -Werror, to keep this
- clean.
-
- * bitmap.c (GdipBitmapSetPixel): Optimize SetPixel, remove
- non-ANSI-isms.
-
- * region.c: Ansi C again.
-
- * hatchbrush.c: ANSI C again.
-
- * graphics.c: Clean up the mess in this file:
-
- Turn into ANSI C: No // for comments; No variable declarations in
- the middle of a file.
-
- Fix the coding style (spacing, indentation).
-
-2004-02-28 Sanjay Gupta <gsanjay@novell.com>
-
- * bitmap.c: Implemented GetPixel and SetPixel method.
- * gdip.h: Added declaration for GetPixel and SetPixel method.
- * gdipImage.h: Removed typedef for ARGB
-
-2004-02-27 Ravindra <rkumar@novell.com>
- * hatchbrush.c: First implementation. Implementing only
- four hatching styles as of now. More to be added.
- * hatchbruush.h: Defines hatch struct, hatchstyle enum
- and also declaration for hatch brush functions.
- * Makefile.am: Added hatchbruch.[ch] to sources.
-
-2004-02-26 Ravindra <rkumar@novell.com>
- * graphics.c: Added cairo_save () and cairo_restore ()
- function calls in Draw and Fill functions.
-
-2004-02-25 Jordi Mas i Hernandez <jordi@ximian.com>
- * StringFormat.c - new methods
- * Font.c - PrivateFontCollection methods
-
-2004-02-24 Jordi Mas i Hernandez <jordi@ximian.com>
- * font.c - added metrics for font families
-
-2004-02-23 Jordi Mas i Hernandez <jordi@ximian.com>
- * graphics.c - added GdipMeasureString
-
-2004-02-22 Ravindra <rkumar@novell.com>
- * texturebrush.c: First implementation. Needs some fixing.
- * texturebrush.h: Defines texture struct, wrapmode enum and
- also declaration for texture functions.
- * Makefile.am: Added texturebruch.[ch] to sources.
-
-2004-02-21 Sanjay Gupta <gsanjay@novell.com>
- * gdip.h: Added typedef for UINT
- * Image.h: Added function stubs for image functions
- * gdipImage.h: Added new file containing image function declaration
-
-2004-02-17 Jordi Mas i Hernandez <jordi@ximian.com>
- * fonts.c - remove unnecesary code and fixes
-
-2004-02-17 Jordi Mas i Hernandez <jordi@ximian.com>
- * fonts.c suport for unit conversion
- * general.c - suport for unit conversion
- * graphics.c - single line drawing
-
-2004-02-16 Ravindra <rkumar@novell.com>
- * gdip.h: Moved GpStatus enum and GpGraphics struct back
- from brush.h in here. Thanks to Duncan, for pointing this
- out.
- * brush.h: Moved out GpStatus enum and GpGraphics struct
- back to gdip.h.
-
-2004-02-13 Ravindra <rkumar@novell.com>
- * brush.h: Added. For implementing brushes in OO-C, we
- have Brush and BrushClass (vtable) structs defined here
- and related functions are declared.
- * solidbrush.h: Added. For implementing brushes in OO-C,
- we have SolidBrush struct defined here. Also, solid brush
- functions are declared.
- * gdip.h: Moved out brush functions to brush.h and solidbrush
- functions to solidbrush.h. Also, moved GpStatus enum and
- GpGraphics struct to brush.h. (This is just to satisfy
- compiler).
- * brush.c: All functions are modified to call functions from
- vtable.
- * solidbrush.c: new(), init(), setup(), clone() and destroy()
- functions are modified.
- * pen.c: gdip_pen_setup(): Modified to call gdip_brush_setup
- irrespective of brush type.
- GdipCreatePen2(): Added status checks. Now we set color
- also when SolidBrush is in the question. This applies to
- GdipSetPenBrushFill() method also.
- * stringformat.c: Renaming method gdip_brush_init to
- gdip_stringformat_init. Because the method name is used
- in brush.c.
-
-2004-02-13 Jordi Mas i Hernandez <jordi@ximian.com>
- * fonts.c fixed re-use of the same font, fixed size problems
- * graphics.c - string format, aligment, etc
- * stringformat.c - initial implementation
-
-2004-02-05 Duncan Mak <duncan@ximian.com>
-
- * gdip.h (GpRect, GpRectF): Instead of storing coordinates in
- terms of top, left, right, bottom, changed it to use X, Y, Width
- and Height instead. This matches the requirements for GDI+ (Flat
- API and the C++ wrapper) as well as System.Drawing.
-
- * bitmap.c (GdipBitmapLockBits):
- * matrix.c (GdipCreateMatrix3, GdipCreateMatrix3I):
- * graphics.c (GdipDrawString):
- * graphics-path.c
- (GdipAddPathRectangles, GdipAddPathRectanglesI): Use X,
- Y, Width, Height coordinates instead of the old system.
-
-2004-02-05 Duncan Mak <duncan@ximian.com>
-
- * graphics.c: Fixed indentation.
-
-2004-02-05 Jordi Mas i Hernandez <jordi@ximian.com>
- * font.c - first implementation
-
-2004-01-29 Duncan Mak <duncan@ximian.com>
-
- * bitmap.c (gdip_bitmap_dispose): Add a check for own_scan0.
- (GdipCreateBitmapFromScan0): Set own_scan0 flag if we own the
- incoming buffer, scan0.
-
- * gdip.h (GdipBitmapData): Add new field, own_scan0.
-
-2004-01-26 Duncan Mak <duncan@ximian.com>
-
- * bitmap.c (GdipCreateBitmapFromScan0): Use GdipAlloc here instead
- of malloc.
- (gdip_bitmap_dispose): Call GdipFree on bitmap->data.scan0 here.
-
- Jordi did the work for this, not me; I'm just the messenger.
-
-2004-01-26 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipDrawPath): Doh! Added stupid breaks inside the
- switch, so we can draw simple paths (lines) now. For more complex
- curves, the array is holding some NaNs, so I'll need to look into
- that.
-
- * bitmap.c:
- (GdipCreateBitmapFromScan0): Set allocate memory for scan0 if it
- is NULL. Thanks to Jordi for fixing this, we can now write out to
- a file again.
-
-2004-01-26 Duncan Mak <duncan@ximian.com>
-
- * graphics.c: Use C style comments instead of C++ style.
-
- * pen.c (clone_dash_array): new helper function.
- (GdipClonePen): Copy matrix and dash_array, removed the FIXME.
-
-2004-01-23 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipDrawPath): Implemented.
-
-2004-01-20 Ravindra <rkumar@novell.com>
-
- * pen.c (GdipGetPenTransform): Fixed function signature, this
- fixes bug #52811.
-
-2004-01-19 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (GdipGetPathPoints): Fixed.
- (GdipCreatePath): Remember to initialize the arrays instead of
- just setting them to NULL.
- (GdipGetPathTypes, GdipGetPathPoints): Fix signature.
-
- * Makefile (local_sources): Add graphics-path.c to the build.
-
-2004-01-13 Duncan Mak <duncan@ximian.com>
-
- * matrix.c (GdipCreateMatrix): Use gdip_get_status instead of just
- returning Ok;
-
-2004-01-13 Bernie Solomon <bernard@ugsolutions.com>
-
- * graphics-path.c (append): fix struct initialization
- for old fashioned C compilers
-
-2004-01-13 Ravindra <rkumar@novell.com>
-
- * pen.c: Initialized pen.matrix field to identity matrix.
-
-2004-01-10 Alexandre Pigolkine <pigolkine@gmx.de>
- * bitmap.c
- * brush.c cosmetic changes
- * gdip.h new field added to GpPen structure
- * gdip_win32.h conditional compilation flag used to reflect changes in Cairo > 0.14
- * graphics.c restore position in GRAPHICS_STATE stack
- * matrix.c order of matrices in GdipMultiplyMatrix changed
- * pen.c initialization of fields, protection in GdipDeletePen function added
-
-2003-12-25 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c (GdipAddPathLine): Use append instead of
- append_point.
- (GdipTransformPath): Remember to reset the points after the
- transformation.
-
-2003-12-25 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (DrawBezier, DrawBezierI): Well, it's pretty obvious
- that the code was incorrect before. After Christmas, I'm gonna
- hook up the GraphicsPath code and work on testing and making sure
- this stuff is correct. I'm pretty sure, in a first pass, there are
- lots of littles bugs waiting to be fixed.
-
- * graphics-path.c (new_point): Removed, we now pack the point
- inside the append functions.
- (append): New function that takes the X, Y coordinates directly.
- (append_bezier): Take coordinates instead of GpPointFs. Use the
- new append function instead of append_point.
-
-2003-12-23 Duncan Mak <duncan@ximian.com>
-
- * graphics-path.c:
- * graphics-path.h: Implemented GraphicsPath.
-
- * Makefile: Added graphics-path.c.
-
- * gdip.h (GpPathPointType, GpWarpMode): Added.
-
-2003-12-21 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (C1): Made it more precise.
- (make_pie): Fixed.
- (make_arc): New helper function for getting the right Bezier for
- an elliptical arc, based on an algorithm found in the
- comp.text.pdf FAQ.
-
-2003-12-02 Bernie Solomon <bernard@ugsolutions.com>
-
- * pen.c (GdipSetPenLineCap): fix arg type so it compiles
- using HP compiler.
-
- * gdip.h: fix spelling of GdipSetPenLineJoin and add
- prototype for GdipGetPenLineJoin
-
-2003-11-28 Duncan Mak <duncan@ximian.com>
-
- * brush.c (gdip_brush_setup): Check on the type of the brush and
- delegate the implementation to the concrete Brushes,
- (GdipCloneBrush, GdipDeleteBrush, GdipGetBrushType): Implemented.
-
- * gdip.h (DashStyle): Fixed typo.
- (PenAlignment, BrushType): Added new enumerations.
- (GpBrush): Added new type field.
- (GpPen): Added new fields: color, brush, mode, dash_array and
- unit. Updated the header file to include new Pen functions.
-
- * pen.c (convert_dash_array): Utitlity function for converting
- from a float* from GDI+ to a double* for Cairo.
- (GdipCreatePen2, GdipClonePen): Implemented.
- (PenWidth, BrushFill, Color, PenMode, PenUnit, DashStyle):
- (DashOffset, DashCount, DashArray): Implemented the Get/Set
- function pairs for these properties.
- (GdipGetPenCompoundArray, GdipSetPenCompoundArray):
- (GdipGetPenCompoundArrayCount): Stubbed.
-
- * solidbrush.c (gdip_solidfill_init): Utility for initializing a
- SolidBrush. Sets type as BrushTypeSolidColor.
- (gdip_solidfill_setup): Moved from gdip_brush_setup.
- (gdip_solidfill_clone): Implementation for GdipCloneBrush for a
- GpSolidFill.
- (GdipSetSolidFillColor, GdipGetSolidFillColor): Implemented.
-
-2003-11-22 Duncan Mak <duncan@ximian.com>
-
- * matrix.c (GdipCreateMatrix3, GdipCreateMatrix3I): Implemented.
- (GdipCloneMatrix): Fixed.
- (GdipShearMatrix, set_shear): Implemented.
-
- * graphics.c:
- (GdipGetWorldTransform, GdipMultiplyWorldTransform): Implemented.
- (GdipRotatePenTransform, GdipTranslatePenTransform): Use GDI+
- functions instead.
-
- * gdip.h
- (GdipRotatePenTransform, GdipTranslatePenTransform): Fix
- signature.
- (GdipCreateMatrix3, GdipCreateMatrix3I): Use const appropriately.
-
-2003-11-17 Duncan Mak <duncan@ximian.com>
-
- * matrix.c (matrix_equals): New helper function help test matrix
- equality.
- (GdipIsMatrixIdentity, GdipIsMatrixEqual): Use matrix_equals.
- (GdipGetMatrixElements): Don't malloc here, because the caller
- should hand us an allocated array.
-
-2003-11-16 Duncan Mak <duncan@ximian.com>
-
- * matrix.c (GdipCreateMatrix2, GdipCreateMatrix3)
- (GdipCreateMatrix3I): Implemented.
-
- * pen.c (GdipResetPenTransform):
- (GdipMultiplyPenTransform, GdipTranslatePenTransform):
- (GdipScalePenTransform, GdipRotatePenTransform): Implemented.
-
- * matrix.c (set_translate, set_scale, set_rotate): Helper
- functions copied from Cairo. We are doing this because you can
- specify the order of multiplcation in GDI+, but not in Cairo.
-
-2003-11-15 Duncan Mak <duncan@ximian.com>
-
- * graphics.c: Moved PI and GRADTORAD to gdip.h.
- * gdip.h: Renamed GRADTORAD to DEGTORAD.
-
- * matrix.c (GdipCloneMatrix): Fix argument order.
- * matrix.c
- (GdipMultiplyMatrix, GdipTranslateMatrix, GdipScaleMatrix):
- (GdipRotateMatrix, GdipInvertMatrix):
- (GdipTransformMatrixPoints, GdipVectorTransformMatrixPoints):
- (GdipSetMatrixElements, GdipGetMatrixElements):
- (GdipIsMatrixInvertible): Implemented.
-
- * matrix.c (GdipIsMatrixIdentity, GdipIsMatrixEqual): Implemented.
-
-2003-11-14 Duncan Mak <duncan@ximian.com>
-
- * general.c (gdip_get_status): Take cairo_status_t instead of
- cairo_t. We need this because this is used in matrix.c and we only
- have cairo_matrix_t there.
- * graphics.c: Updated calls to gdip_get_status.
-
- * pen.c
- (convert_line_cap, convert_line_join): Added static keyword.
- (GdipDeletePen): Implemented.
-
- * matrix.c
- (GdipCreateMatrix2, GdipCloneMatrix, GdipInvertMatrix): Use
- gdip_get_status instead of just returning Ok.
- (GdipRotateMatrix, GdipScaleMatrix, GdipTranslateMatrix):
- Implemented.
-
-2003-11-12 Duncan Mak <duncan@ximian.com>
-
- * bitmap.c, brush.c, general.c:
- * graphics.c, image.c, matrix.c:
- * pen.c, solidbrush.c: Use gdip.h instead of gdip_main.h.
-
- * gdip.h: New header file, merged from gdip_main.h and
- gdip_defs.h.
-
- * gdip_main.h, gdip_defs.h: Removed.
-
- * pen.c
- (convert_line_join, convert_line_cap): new function for converting
- enumerations between GDI+ and Cairo.
- (gdip_pen_setup): set miter limit and line join.
- (GdipSetPenMiterLimit, GdipGetPenMiterLimit):
- (GdipSetPenLineJoin, GdipGetPenLineJoin):
- (GdipSetPenLineJoin, GdipGetPenTransform): implemented.
-
-2003-11-12 Alexandre Pigolkine <pigolkine@gmx.de>
- * bitmap.c copy image funciton added
-
-2003-11-06 Duncan Mak <duncan@ximian.com>
-
- * graphics.c (GdipDrawRectangle): Add call to gdip_pen_setup so
- that we stroke with the right color.
-
-2003-11-05 Duncan Mak <duncan@ximian.com>
-
- * graphics.c
- (make_pie, make_ellipse, make_polygon): Add static keyword.
-
- * gdip_defs.h: Update headers to include DrawBezier, DrawBeziers,
- DrawEllipse, DrawPie, DrawPolygon, DrawRectangle, FillEllipse,
- FillPolygon and the RenderingOrigin property.
-
- * Makefile (install-local): Added missing semi-colons.
-
-2003-11-03 Bernie Solomon <bernard@ugsolutions.com>
-
- * gdip_main.h, gdip_win32.h, gdip_win32.c:
- fixes for non-GCC compilers
-
-2003-11-02 Alexandre Pigolkine <pigolkine@gmx.de>
-
- * bitmap.c convert 24/32 bpp images in LockBits
-
-2003-11-01 Duncan Mak <duncan@ximian.com>
-
- * matrix.c
- (GdipCreateMatrix, GdipCreateMatrix2, GdipCloneMatrix):
- (GdipDeleteMatrix, GdipInvertMatrix): Implemented; the rest of the
- functions are stubbed out.
-
- * gdip_defs.h (GpMatrixOrder): Added.
-
- * gdip_main.h
- (GpRect, GpRectF): Synonyms for Rect and RectF.
- (GpMatrix): An alias of cairo_matrix_t.
-
- * Makefile: Added matrix.c.
-
-2003-10-28 Duncan Mak <duncan@ximian.com>
-
- * gdip_main.h, gdip_def.h:
- Renamed all gdip_foo_ptr types are now GpFoo *.
- Renamed Status to GpStatus.
- Reformatted all C++ style comments to C style comments.
- Reformatted all C function prototypes to the style used by GTK+.
-
- * gdip_main.h (GpPoint, GpPointF): Added.
-
- * gdip_defs.h (GpFillMode): Added.
-
- * graphics.c (make_ellipse):
- (make_polygon, make_polygon_from_integers):
- (make_pie): private functions (make_foo) to be reused by DrawFoo
- and FillFoo.
-
- (convert_fill_mode): Converts a GpFillMode to a cairo_fill_rule_t.
-
- (GdipDrawPie, GdipFillEllipse, GdipFillPolygon): Implemented.
-
-2003-10-26 Duncan Mak <duncan@ximian.com>
-
- * graphics.c
- (GdipSetRenderingOrigin, GdipGetRenderingOrigin): Implemented.
-
-2003-10-25 Duncan Mak <duncan@ximian.com>
-
- * graphics.c
- (GdipDrawBezier, GdipDrawBezierI):
- (GdipDrawBeziers, GdipDrawBeziersI):
- (GdipDrawLine, GdipDrawLineI):
- (GdipDrawLines, GdipDrawLinesI): implemented.
-
- (GdipFillRectangle):
- (GdipDrawString): Make use of gdip_get_status.
-
- * general.c
- (gdip_get_status): A new function for retrieving a Status from a
- cairo_t.
-
-2003-10-23 Miguel de Icaza <miguel@ximian.com>
-
- * bitmap.c (GdipCreateBitmapFromScan0): Do not allocate buffer
- here, expect that our caller to allocate that.
-
- Do not compute the stride here, expect our caller to do this
- properly.
-
- * Use the Mono coding conventions.
-
-2003-10-15 Alexandre Pigolkine <pigolkine@gmx.de>
- * image.c GdipDrawImageRectI changed
-
-2003-10-14 Alexandre Pigolkine <pigolkine@gmx.de>
- * gdip_defs.h
- * graphics.c
- * gdip_main.h
- DrawString function added
-
-2003-10-12 Alexandre Pigolkine <pigolkine@gmx.de>
- * bitmap.c
- * brush.c
- * gdip_defs.h
- * gdip_win32.c
- * gdip_win32.h
- * gdip_main.h
- * general.c
- * graphics.c
- * image.c
- * Makefile
- * pen.c
- * solidbrush.c
- Added
View
48 src/Makefile.am
@@ -1,48 +0,0 @@
-lib_LTLIBRARIES = libgdiplus.la
-
-libgdiplus_la_SOURCES = \
- adjustablearrowcap.c \
- bitmap.c \
- brush.c \
- brush.h \
- customlinecap.c \
- customlinecap.h \
- font.c \
- gdip.h \
- gdipImage.h \
- gdip_win32.c \
- gdip_win32.h \
- general.c \
- graphics.c \
- graphics-path.c \
- graphics-path.h \
- hatchbrush.c \
- hatchbrush.h \
- image.c \
- lineargradientbrush.c \
- lineargradientbrush.h \
- matrix.c \
- pen.c \
- pathgradientbrush.c \
- pathgradientbrush.h \
- region.c \
- solidbrush.c \
- solidbrush.h \
- stringformat.c \
- texturebrush.c \
- texturebrush.h \
- pngcodec.h \
- pngcodec.c \
- gifcodec.h \
- gifcodec.c \
- tiffcodec.h \
- tiffcodec.c \
- bmpcodec.h \
- bmpcodec.c \
- jpegcodec.h \
- imageattributes.c \
- jpegcodec.c
-
-libgdiplus_la_LIBADD = $(GDIPLUS_LIBS)
-
-INCLUDES = $(GDIPLUS_CFLAGS) -Wall -Werror -Wno-unused -Wno-format
View
214 src/adjustablearrowcap.c
@@ -1,214 +0,0 @@
-/*
- * adjustablearrowcap.c
- *
- * Copyright (C) Novell, Inc. 2003-2004.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
- * and associated documentation files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
- * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Author:
- * Ravindra (rkumar@novell.com)
- *
- * Copyright (C) 2004 Novell, Inc. http://www.novell.com
- */
-
-#include "gdip.h"
-#include "customlinecap.h"
-
-static GpStatus gdip_adjust_arrowcap_setup (GpGraphics *graphics, GpCustomLineCap *cap);
-static GpStatus gdip_adjust_arrowcap_clone_cap (GpCustomLineCap *cap, GpCustomLineCap **clonedCap);
-static GpStatus gdip_adjust_arrowcap_destroy (GpCustomLineCap *cap);
-
-/*
- * we have a single copy of vtable for
- * all instances of adjustable arrowcap.
- */
-
-static CapClass vtable = { CustomLineCapTypeAdjustableArrow,
- gdip_adjust_arrowcap_setup,
- gdip_adjust_arrowcap_clone_cap,
- gdip_adjust_arrowcap_destroy };
-
-void
-gdip_adjust_arrowcap_init (GpAdjustableArrowCap *arrow)
-{
- gdip_custom_linecap_init (&arrow->base, &vtable);
- arrow->fill_state = TRUE;
- arrow->middle_inset = 0.0;
-}
-
-GpAdjustableArrowCap *
-gdip_adjust_arrowcap_new (void)
-{
- GpAdjustableArrowCap *result = (GpAdjustableArrowCap *) GdipAlloc (sizeof (GpAdjustableArrowCap));
-
- if (result)
- gdip_adjust_arrowcap_init (result);
-
- return result;
-}
-
-GpStatus
-gdip_adjust_arrowcap_clone_cap (GpCustomLineCap *cap, GpCustomLineCap **clonedCap)
-{
- GpAdjustableArrowCap *newcap;
-
- g_return_val_if_fail (cap != NULL, InvalidParameter);
- g_return_val_if_fail (clonedCap != NULL, InvalidParameter);
-
- newcap = (GpAdjustableArrowCap *) GdipAlloc (sizeof (GpAdjustableArrowCap));
-
- g_return_val_if_fail (newcap != NULL, OutOfMemory);
-
- memcpy (newcap, cap, sizeof (GpAdjustableArrowCap));
- *clonedCap = (GpCustomLineCap *) newcap;
-
- return Ok;
-}
-
-GpStatus
-gdip_adjust_arrowcap_destroy (GpCustomLineCap *cap)
-{
- g_return_val_if_fail (cap != NULL, InvalidParameter);
-
- GdipFree (cap);
-
- return Ok;
-}
-
-GpStatus
-gdip_adjust_arrowcap_setup (GpGraphics *graphics, GpCustomLineCap *customCap)
-{
- GpAdjustableArrowCap *arrow;
- cairo_pattern_t *pattern;
- cairo_t *ct;
- GpStatus status;
-
- g_return_val_if_fail (graphics != NULL, InvalidParameter);
- g_return_val_if_fail (customCap != NULL, InvalidParameter);
-
- ct = graphics->ct;
- arrow = (GpAdjustableArrowCap *) customCap;
-
- g_return_val_if_fail (ct != NULL, InvalidParameter);
-
- status = NotImplemented;
-
- return status;
-}
-
-/* AdjustableArrowCap functions */
-GpStatus
-GdipCreateAdjustableArrowCap (float height, float width, bool isFilled, GpAdjustableArrowCap **arrowCap)
-{
- GpAdjustableArrowCap *cap;
-
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
-
- cap = gdip_adjust_arrowcap_new ();
- g_return_val_if_fail (cap != NULL, OutOfMemory);
-
- cap->fill_state = isFilled;
- cap->width = width;
- cap->height = height;
-
- *arrowCap = cap;
-
- return Ok;
-}
-
-GpStatus
-GdipSetAdjustableArrowCapHeight (GpAdjustableArrowCap *arrowCap, float height)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
-
- arrowCap->height = height;
-
- return Ok;
-}
-
-GpStatus
-GdipGetAdjustableArrowCapHeight (GpAdjustableArrowCap *arrowCap, float *height)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
- g_return_val_if_fail (height != NULL, InvalidParameter);
-
- *(height) = arrowCap->height;
-
- return Ok;
-}
-
-GpStatus
-GdipSetAdjustableArrowCapWidth (GpAdjustableArrowCap *arrowCap, float width)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
-
- arrowCap->width = width;
-
- return Ok;
-}
-
-GpStatus
-GdipGetAdjustableArrowCapWidth (GpAdjustableArrowCap *arrowCap, float *width)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
- g_return_val_if_fail (width != NULL, InvalidParameter);
-
- *(width) = arrowCap->width;
-
- return Ok;
-}
-
-GpStatus
-GdipSetAdjustableArrowCapMiddleInset (GpAdjustableArrowCap *arrowCap, float middleInset)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
-
- arrowCap->middle_inset = middleInset;
-
- return Ok;
-}
-
-GpStatus
-GdipGetAdjustableArrowCapMiddleInset (GpAdjustableArrowCap *arrowCap, float *middleInset)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
- g_return_val_if_fail (middleInset != NULL, InvalidParameter);
-
- *(middleInset) = arrowCap->middle_inset;
-
- return Ok;
-}
-
-GpStatus
-GdipSetAdjustableArrowCapFillState (GpAdjustableArrowCap *arrowCap, bool isFilled)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
-
- arrowCap->fill_state = isFilled;
-
- return Ok;
-}
-
-GpStatus
-GdipGetAdjustableArrowCapFillState (GpAdjustableArrowCap *arrowCap, bool *isFilled)
-{
- g_return_val_if_fail (arrowCap != NULL, InvalidParameter);
- g_return_val_if_fail (isFilled != NULL, InvalidParameter);
-
- *(isFilled) = arrowCap->fill_state;
-
- return Ok;
-}
View
951 src/bitmap.c
</
@@ -1,951 +0,0 @@
-/*
- * bitmap.c
- *
- * Copyright (c) 2003 Alexandre Pigolkine
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
- * and associated documentation files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
- * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Alexandre Pigolkine (pigolkine@gmx.de)
- * Vladimir Vukicevic (vladimir@pobox.com)
- * Jordi Mas (jordi@ximian.com)
- */
-
-#include <glib.h>
-#include "gdip.h"
-#include "gdip_win32.h"
-#include "gdipImage.h"
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-
-/* Pick an unlikely combination. This pixel color will be interpreted as 'transparent'
- when mapping Wine pixels onto a cairo image. Need to do this crude hack since there
- is no bitmap alpha component in regular Win32 bitmaps */
-#define UNALTERED_PIXEL 0x00959293
-
-/*
- Those are the only pixel formats that we really support
-*/
-BOOL
-gdip_is_a_supported_pixelformat (PixelFormat fmt)
-{
- switch (fmt) {
-
- case Format24bppRgb:
- case Format32bppArgb:
- case Format32bppPArgb:
- case Format32bppRgb:
- return TRUE;
- default:
- return FALSE;
- }
-}
-
-void
-gdip_bitmap_init (GpBitmap *bitmap)
-{
- gdip_image_init (&bitmap->image);
- bitmap->image.type = imageBitmap;
- bitmap->data.Width = 0;
- bitmap->data.Height = 0;
- bitmap->data.Stride = 0;
- bitmap->data.PixelFormat = Format32bppArgb;
- bitmap->data.Scan0 = 0;
- bitmap->data.Reserved = 0;
- bitmap->cairo_format = CAIRO_FORMAT_ARGB32;
-
- bitmap->hBitmapDC = 0;
- bitmap->hInitialBitmap = 0;
- bitmap->hBitmap = 0;
-}
-
-
-
-void
-gdip_bitmap_clone (GpBitmap *bitmap, GpBitmap **clonedbitmap)
-{
- GpBitmap *result = (GpBitmap *) GdipAlloc (sizeof (GpBitmap));
- memcpy (result, bitmap, sizeof (GpBitmap));
-
- result->data.Scan0 = (GpBitmap *) malloc (bitmap->data.Stride * bitmap->data.Height);
- memcpy (result->data.Scan0, bitmap->data.Scan0, bitmap->data.Stride * bitmap->data.Height);
- *clonedbitmap = result;
-
- result->image.surface = NULL;
-
- /*TODO: We should also copy palette info when we support it*/
-}
-
-
-GpBitmap *
-gdip_bitmap_new ()
-{
- GpBitmap *result = (GpBitmap *) GdipAlloc (sizeof (GpBitmap));
- gdip_bitmap_init (result);
- return result;
-}
-
-/*
- * This should only be called from GdipDisposeImage, and it should *not* free
- * the structure, that one is freed by GdipDisposeImage
- */
-void
-gdip_bitmap_dispose (GpBitmap *bitmap)
-{
- if ((bitmap->data.Reserved & GBD_OWN_SCAN0) != 0)
- GdipFree (bitmap->data.Scan0);
-}
-
-
-void *
-gdip_bitmap_create_Win32_HDC (GpBitmap *bitmap)
-{
- void * result = 0;
- void * hdc = CreateCompatibleDC_pfn (0);
- void * hbitmap = 0, * holdbitmap = 0;
- void * hdcDesc = GetDC_pfn (0);
-
- hbitmap = CreateCompatibleBitmap_pfn (hdcDesc, bitmap->data.Width, bitmap->data.Height);
- if (hbitmap != 0) {
- BITMAPINFO bmi;
- gdip_bitmap_fill_info_header (bitmap, &bmi.bmiHeader);
-
- SetDIBits_pfn (hdc, hbitmap, 0, bitmap->data.Height, bitmap->data.Scan0, &bmi, 0);
- holdbitmap = SelectObject_pfn (hdc, hbitmap);
- bitmap->hBitmapDC = hdc;
- bitmap->hInitialBitmap = holdbitmap;
- bitmap->hBitmap = hbitmap;
- result = hdc;
- } else {
- DeleteDC_pfn (hdc);
- }
- ReleaseDC_pfn (0, hdcDesc);
- return result;
-}
-
-void
-gdip_bitmap_destroy_Win32_HDC (GpBitmap *bitmap, void *hdc)
-{
- if (bitmap->hBitmapDC == hdc) {
-
- BITMAPINFO bmi;
- int res = 0;
- unsigned long *array, *end;
-
- SelectObject_pfn (bitmap->hBitmapDC, bitmap->hInitialBitmap);
-
- gdip_bitmap_fill_info_header (bitmap, &bmi.bmiHeader);
- res = GetDIBits_pfn (bitmap->hBitmapDC, bitmap->hBitmap, 0, bitmap->data.Height, bitmap->data.Scan0, &bmi, 0);
-
- if (bitmap->cairo_format == CAIRO_FORMAT_ARGB32) {
- array = bitmap->data.Scan0;
- end = array + (bmi.bmiHeader.biSizeImage >> 2);
- while (array < end) {
- if (*array!=UNALTERED_PIXEL) {
- *array |= 0xff000000;
- }
- ++array;
- }
- }
-
- DeleteObject_pfn (bitmap->hBitmap);
- DeleteDC_pfn (bitmap->hBitmapDC);
- bitmap->hBitmapDC = 0;
- bitmap->hInitialBitmap = 0;
- bitmap->hBitmap = 0;
- }
-}
-
-GpStatus
-GdipCreateBitmapFromScan0 (int width, int height, int stride, int format, void *scan0, GpBitmap **bitmap)
-{
- GpBitmap *result = 0;
- bool own_scan0 = FALSE;
- int cairo_format = 0;
-
- switch (format) {
- case Format24bppRgb:
- cairo_format = CAIRO_FORMAT_RGB24;
- break;
- case Format32bppArgb:
- case Format32bppRgb:
- case Format32bppPArgb:
- cairo_format = CAIRO_FORMAT_ARGB32;
- break;
- case Format8bppIndexed:
- cairo_format = CAIRO_FORMAT_A8;
- break;
- case Format1bppIndexed:
- cairo_format = CAIRO_FORMAT_A1;
- break;
- default:
- *bitmap = NULL;
- return NotImplemented;
- }
-
- result = gdip_bitmap_new ();
- result->data.Width = result->image.width = width;
- result->data.Height = result->image.height = height;
- result->data.PixelFormat = result->image.pixFormat = format;
- result->cairo_format = cairo_format;
-
- if (stride == 0) {
- int bpp = gdip_get_pixel_format_components (format);
- bpp = bpp * gdip_get_pixel_format_depth (format);
- stride = (bpp * width) / 8;
- stride = (stride + 3) & ~3;
- }
-
- if (scan0 == NULL) {
- scan0 = GdipAlloc (stride * height);
- memset (scan0, 0, stride * height);
- own_scan0 = TRUE;
- }
-
-
- result->data.Scan0 = scan0;
- result->data.Stride = stride;
-
- if (own_scan0)
- result->data.Reserved |= GBD_OWN_SCAN0;
-
- *bitmap = result;
-
- return Ok;
-}
-
-GpStatus
-GdipCreateBitmapFromGraphics (int width, int height, GpGraphics *graphics, GpBitmap **bitmap)
-{
- GpBitmap *result = 0;
- int bmpSize = 0;
- int stride = width;
- unsigned long *ptr;
- unsigned char *endptr;
-
- /*
- * FIXME: should get the stride based on the format of the graphics object.
- */
- while (stride % 4)
- stride++;
-
- stride *= 4;
- bmpSize = stride * height;
- result = gdip_bitmap_new ();
- result->data.Width = result->image.width = width;
- result->data.Height = result->image.height = height;
- result->data.PixelFormat = result->image.pixFormat = Format32bppArgb;
- result->data.Stride = stride;
-
- result->data.Scan0 = GdipAlloc (bmpSize);
-
- ptr=result->data.Scan0;
- endptr=result->data.Scan0+bmpSize;
- while ((unsigned char *)ptr<endptr) {
- ptr[0]=UNALTERED_PIXEL;
- ptr++;
- }
-
- result->data.Reserved |= GBD_OWN_SCAN0;
- *bitmap = result;
- return Ok;
-}
-
-GpStatus
-GdipCreateBitmapFromHBITMAP(void *hbm, void *hpal, GpBitmap** bitmap)
-{
- return(NotImplemented);
-}
-
-GpStatus
-GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap, void **hbmReturn, unsigned long background)
-{
- return(NotImplemented);
-}
-
-GpStatus
-GdipCreateBitmapFromHICON(void *hicon, GpBitmap** bitmap)
-{
- return(NotImplemented);
-}
-
-GpStatus
-GdipCreateHICONFromBitmap(GpBitmap* bitmap, void **hbmReturn)
-{
- return(NotImplemented);
-}
-
-GpStatus
-GdipCreateBitmapFromResource(void *hInstance, GDIPCONST WCHAR *lpBitmapName, GpBitmap** bitmap)
-{
- return(NotImplemented);
-}
-
-GpStatus
-GdipCloneBitmapAreaI (int x, int y, int width, int height, PixelFormat format,
- GpBitmap *original, GpBitmap **bitmap)
-{
- GpBitmap *result = 0;
- GdipBitmapData bd;
- Rect sr = { x, y, width, height };
- Rect dr = { 0, 0, width, height };
- GpStatus st;
-
- g_return_val_if_fail (original != NULL, InvalidParameter);
- g_return_val_if_fail (bitmap != NULL, InvalidParameter);
-
- g_return_val_if_fail (x + width <= original->data.Width, InvalidParameter);
- g_return_val_if_fail (y + height <= original->data.Height, InvalidParameter);
-
- bd.Scan0 = NULL;
- bd.PixelFormat = format;
-
- st = gdip_bitmap_clone_data_rect (&original->data, &sr, &bd, &dr);
- if (st != Ok)
- return st;
-
- result = gdip_bitmap_new ();
- result->cairo_format = original->cairo_format;
- memcpy (&result->data, &bd, sizeof (GdipBitmapData));
- result->image.pixFormat = format; /* this is only used by image codecs */
- result->image.format = original->image.format;