diff options
author | scuri <scuri> | 2010-06-17 21:42:12 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-06-17 21:42:12 +0000 |
commit | 2fd2a2214829a2edefa5df2c6a09ded48fe7bd3b (patch) | |
tree | 7f09a0fedf129e8a720014de512383710750e94c /src | |
parent | debc9599032c7036006ec124f4ef8f44b8935568 (diff) |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 13 | ||||
-rw-r--r-- | src/cairo/cdcairo.c | 6 | ||||
-rw-r--r-- | src/config.mak | 64 | ||||
-rw-r--r-- | src/make_uname | 8 | ||||
-rw-r--r-- | src/make_uname.bat | 45 |
5 files changed, 57 insertions, 79 deletions
diff --git a/src/Makefile b/src/Makefile index ca98220..3a00315 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,12 +1,13 @@ -.PHONY: do_all cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 -#do_all: cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 -do_all: cd_freetype cd cdgdk cd_pdflib cdpdf cdcontextplus cdlua5 cdluapdf5 cdluacontextplus5 cdluaim5 +.PHONY: do_all cd_freetype cd cdx11 cdgdk cd_pdflib cdpdf cdcontextplus cdcairo cdlua3 cdluapdf3 cdlua5 cdluapdf5 cdluacontextplus5 cdluacairo5 cdluaim5 +do_all: cd_freetype cd cd_pdflib cdpdf cdlua5 cdluapdf5 cdluaim5 cd_freetype: @$(MAKE) --no-print-directory -f tecmake.mak MF=cd_freetype cd: - @$(MAKE) --no-print-directory -f tecmake.mak + @$(MAKE) --no-print-directory -f tecmake.mak +cdx11: + @$(MAKE) --no-print-directory -f tecmake.mak USE_X11=Yes cdgdk: @$(MAKE) --no-print-directory -f tecmake.mak USE_GDK=Yes cd_pdflib: @@ -15,6 +16,8 @@ cdpdf: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdpdf cdcontextplus: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdcontextplus +cdcairo: + @$(MAKE) --no-print-directory -f tecmake.mak MF=cdcairo cdlua3: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdlua3 cdluapdf3: @@ -25,5 +28,7 @@ cdluapdf5: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdluapdf5 cdluacontextplus5: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdluacontextplus5 +cdluacairo5: + @$(MAKE) --no-print-directory -f tecmake.mak MF=cdluacairo5 cdluaim5: @$(MAKE) --no-print-directory -f tecmake.mak MF=cdluaim5 diff --git a/src/cairo/cdcairo.c b/src/cairo/cdcairo.c index 1b7f867..869e0ed 100644 --- a/src/cairo/cdcairo.c +++ b/src/cairo/cdcairo.c @@ -155,6 +155,7 @@ static int cdclip(cdCtxCanvas *ctxcanvas, int mode) switch (mode) { case CD_CLIPOFF: + cairo_rectangle(ctxcanvas->cr, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); break; case CD_CLIPAREA: cairo_rectangle(ctxcanvas->cr, ctxcanvas->canvas->clip_frect.xmin, @@ -203,9 +204,6 @@ static int cdclip(cdCtxCanvas *ctxcanvas, int mode) break; } - if (mode != CD_CLIPOFF) - cairo_clip(ctxcanvas->cr); - return mode; } @@ -622,6 +620,8 @@ static void cdclear(cdCtxCanvas* ctxcanvas) cairo_save (ctxcanvas->cr); cairo_identity_matrix(ctxcanvas->cr); cairo_reset_clip(ctxcanvas->cr); + cairo_rectangle(ctxcanvas->cr, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); + cairo_clip(ctxcanvas->cr); cairo_set_source_rgba(ctxcanvas->cr, cdCairoGetRed(ctxcanvas->canvas->background), cdCairoGetGreen(ctxcanvas->canvas->background), cdCairoGetBlue(ctxcanvas->canvas->background), cdCairoGetAlpha(ctxcanvas->canvas->background)); cairo_set_operator (ctxcanvas->cr, CAIRO_OPERATOR_SOURCE); cairo_paint (ctxcanvas->cr); /* paints the current source everywhere within the current clip region. */ diff --git a/src/config.mak b/src/config.mak index a972968..384b9a7 100644 --- a/src/config.mak +++ b/src/config.mak @@ -2,6 +2,28 @@ PROJNAME = cd LIBNAME = cd OPT = YES +ifdef GTK_DEFAULT + ifdef USE_X11 + # Build X11 version in Linux,Darwin,FreeBSD + LIBNAME := $(LIBNAME)x11 + else + ifeq ($(findstring Win, $(TEC_SYSNAME)), ) + # Force definition if not in Windows + USE_GDK = Yes + endif + endif +else + ifdef USE_GDK + # Build GDK version in IRIX,SunOS,AIX,Win32 + LIBNAME := $(LIBNAME)gdk + else + ifeq ($(findstring Win, $(TEC_SYSNAME)), ) + # Force definition if not in Windows + USE_X11 = Yes + endif + endif +endif + DEFINES = CD_NO_OLD_INTERFACE SRCSVG = base64.c lodepng.c cdsvg.c @@ -39,36 +61,25 @@ SRCCOMM = cd.c wd.c wdhdcpy.c rgb2map.c cd_vectortext.c cd_active.c \ SRC = $(SRCCOMM) $(SRCSVG) $(SRCINTCGM) $(SRCDRV) $(SRCSIM) INCLUDES = . drv x11 win32 intcgm freetype2 sim cairo ../include -ifneq ($(findstring Win, $(TEC_SYSNAME)), ) - ifdef USE_GDK - SRC += $(SRCGDK) $(SRCNULL) $(SRCCAIRO) - LIBNAME := $(LIBNAME)gdk - USE_GTK = Yes - LIBS += cairo - else - SRC += $(SRCWIN32) - endif - LIBS = freetype6 -else - ifdef USE_GDK - SRC += $(SRCGDK) $(SRCCAIRO) cairo/cdcairoprn.c +ifdef USE_GDK + SRC += $(SRCGDK) $(SRCNULL) $(SRCCAIRO) + USE_GTK = Yes + LIBS = pangocairo-1.0 cairo + ifeq ($(findstring Win, $(TEC_SYSNAME)), ) + SRC += cairo/cdcairoprn.c INCLUDES += /usr/include/gtk-unix-print-2.0 - USE_GTK = Yes - LIBS += cairo - ifndef GTK_DEFAULT - # Build GDK version in IRIX,SunOS,AIX,Win32 - LIBNAME := $(LIBNAME)gdk - endif + LIBS += freetype else - ifdef GTK_DEFAULT - # Build X11 version in Linux,Darwin,FreeBSD - LIBNAME := $(LIBNAME)x11 - endif - SRC += $(SRCX11) - USE_X11 = Yes + LIBS += freetype6 endif - SRC += $(SRCNULL) +else +ifdef USE_X11 + SRC += $(SRCX11) $(SRCNULL) LIBS = freetype +else + SRC += $(SRCWIN32) + LIBS = freetype6 +endif endif ifneq ($(findstring dll, $(TEC_UNAME)), ) @@ -76,4 +87,3 @@ ifneq ($(findstring dll, $(TEC_UNAME)), ) endif LDIR = ../lib/$(TEC_UNAME) - diff --git a/src/make_uname b/src/make_uname index 8c2f35e..40cae83 100644 --- a/src/make_uname +++ b/src/make_uname @@ -1,7 +1,7 @@ #This builds all the libraries of the folder for 1 uname tecmake $1 MF=cd_freetype $2 $3 $4 $5 $6 $7 $8 -tecmake $1 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 USE_X11=Yes $2 $3 $4 $5 $6 $7 $8 tecmake $1 USE_GDK=Yes $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cd_pdflib $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cdpdf $2 $3 $4 $5 $6 $7 $8 @@ -11,7 +11,9 @@ tecmake $1 MF=cdlua5 $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cdluaim5 $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cdluapdf5 $2 $3 $4 $5 $6 $7 $8 -# XRender is NOT available in AIX, IRIX and SunOS -# It is available in Linux, Darwin and FreeBSD +# XRender and Cairo are NOT available in AIX, IRIX and SunOS +# It is available in Linux and BSD tecmake $1 MF=cdcontextplus $2 $3 $4 $5 $6 $7 $8 tecmake $1 MF=cdluacontextplus5 $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdcairo $2 $3 $4 $5 $6 $7 $8 +tecmake $1 MF=cdluacairo5 $2 $3 $4 $5 $6 $7 $8 diff --git a/src/make_uname.bat b/src/make_uname.bat index 6d84df8..f361941 100644 --- a/src/make_uname.bat +++ b/src/make_uname.bat @@ -1,9 +1,6 @@ @echo off REM This builds all the libraries of the folder for 1 uname -if "%1"=="VC" goto gdiplus_VC -if "%1"=="vc-all" goto all-vc - call tecmake %1 "MF=cd_freetype" %2 %3 %4 %5 %6 %7 %8 call tecmake %1 %2 %3 %4 %5 %6 %7 %8 call tecmake %1 "USE_GDK=Yes" %2 %3 %4 %5 %6 %7 %8 @@ -15,44 +12,8 @@ call tecmake %1 "MF=cdlua5" %2 %3 %4 %5 %6 %7 %8 call tecmake %1 "MF=cdluapdf5" %2 %3 %4 %5 %6 %7 %8 call tecmake %1 "MF=cdluaim5" %2 %3 %4 %5 %6 %7 %8 -if "%1"=="vc6" goto gdiplus -if "%1"=="vc7" goto gdiplus -if "%1"=="vc8" goto gdiplus -if "%1"=="vc8_64" goto gdiplus -if "%1"=="vc9" goto gdiplus -if "%1"=="vc9_64" goto gdiplus -if "%1"=="dll" goto gdiplus -if "%1"=="dll7" goto gdiplus -if "%1"=="dll8" goto gdiplus -if "%1"=="dll8_64" goto gdiplus -if "%1"=="dll9" goto gdiplus -if "%1"=="dll9_64" goto gdiplus -if "%1"=="all" goto all-vc -goto end - -:gdiplus +REM GDI+ and Cairo are NOT available in some compilers call tecmake %1 "MF=cdcontextplus" %2 %3 %4 %5 %6 call tecmake %1 "MF=cdluacontextplus5" %2 %3 %4 %5 %6 %7 %8 -goto end - -:gdiplus_VC -call tecmake %2 "MF=cdcontextplus" %3 %4 %5 %6 -call tecmake %2 "MF=cdluacontextplus5" %3 %4 %5 %6 %7 %8 -goto end - -:all-vc -call make_uname VC vc6 %2 %3 %4 %5 %6 -call make_uname VC vc7 %2 %3 %4 %5 %6 -call make_uname VC vc8 %2 %3 %4 %5 %6 -call make_uname VC vc8_64 %2 %3 %4 %5 %6 -call make_uname VC vc9 %2 %3 %4 %5 %6 -call make_uname VC vc9_64 %2 %3 %4 %5 %6 -call make_uname VC dll %2 %3 %4 %5 %6 -call make_uname VC dll7 %2 %3 %4 %5 %6 -call make_uname VC dll8 %2 %3 %4 %5 %6 -call make_uname VC dll8_64 %2 %3 %4 %5 %6 -call make_uname VC dll9 %2 %3 %4 %5 %6 -call make_uname VC dll9_64 %2 %3 %4 %5 %6 -goto end - -:end +call tecmake %1 "MF=cdcairo" %2 %3 %4 %5 %6 +call tecmake %1 "MF=cdluacairo5" %2 %3 %4 %5 %6 %7 %8 |