diff options
author | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
---|---|---|
committer | Denis Bitouzé <dbitouze@wanadoo.fr> | 2021-02-25 18:23:07 +0000 |
commit | c6101f91d071883b48b1b4b51e5eba0f36d9a78d (patch) | |
tree | 1bf7f5a881d7a4f5c5bf59d0b2821943dd822372 /Build/source/libs/gd/libgd-src/examples | |
parent | 07ee7222e389b0777456b427a55c22d0e6ffd267 (diff) |
French translation for tlmgr updated
git-svn-id: svn://tug.org/texlive/trunk@57912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/examples')
27 files changed, 0 insertions, 1370 deletions
diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/CMakeDirectoryInformation.cmake b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/CMakeDirectoryInformation.cmake deleted file mode 100644 index 0508ce8f71b..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/CMakeDirectoryInformation.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.10 - -# Relative path conversion top directories. -set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/root/workspace/hanqiang/libgd_release_2.3.1/libgd") -set(CMAKE_RELATIVE_PATH_TOP_BINARY "/root/workspace/hanqiang/libgd_release_2.3.1/libgd") - -# Force unix paths in dependencies. -set(CMAKE_FORCE_UNIX_PATHS 1) - - -# The C and CXX include file regular expressions for this directory. -set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") -set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") -set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) -set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/DependInfo.cmake b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/DependInfo.cmake deleted file mode 100644 index 2d9d1373b5a..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/DependInfo.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - "C" - ) -# The set of files for implicit dependencies of each language: -set(CMAKE_DEPENDS_CHECK_C - "/root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/gif.c" "/root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/CMakeFiles/gif.dir/gif.c.o" - ) -set(CMAKE_C_COMPILER_ID "GNU") - -# Preprocessor definitions for this target. -set(CMAKE_TARGET_DEFINITIONS_C - "HAVE_CONFIG_H" - ) - -# The include file search paths: -set(CMAKE_C_TARGET_INCLUDE_PATH - "." - "src" - "before" - ) - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - "/root/workspace/hanqiang/libgd_release_2.3.1/libgd/src/CMakeFiles/gd.dir/DependInfo.cmake" - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/build.make b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/build.make deleted file mode 100644 index 3d800ef80fe..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/build.make +++ /dev/null @@ -1,114 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.10 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /root/workspace/hanqiang/libgd_release_2.3.1/libgd - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /root/workspace/hanqiang/libgd_release_2.3.1/libgd - -# Include any dependencies generated for this target. -include examples/CMakeFiles/gif.dir/depend.make - -# Include the progress variables for this target. -include examples/CMakeFiles/gif.dir/progress.make - -# Include the compile flags for this target's objects. -include examples/CMakeFiles/gif.dir/flags.make - -examples/CMakeFiles/gif.dir/gif.c.o: examples/CMakeFiles/gif.dir/flags.make -examples/CMakeFiles/gif.dir/gif.c.o: examples/gif.c - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/root/workspace/hanqiang/libgd_release_2.3.1/libgd/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object examples/CMakeFiles/gif.dir/gif.c.o" - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/gif.dir/gif.c.o -c /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/gif.c - -examples/CMakeFiles/gif.dir/gif.c.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/gif.dir/gif.c.i" - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/gif.c > CMakeFiles/gif.dir/gif.c.i - -examples/CMakeFiles/gif.dir/gif.c.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/gif.dir/gif.c.s" - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/gif.c -o CMakeFiles/gif.dir/gif.c.s - -examples/CMakeFiles/gif.dir/gif.c.o.requires: - -.PHONY : examples/CMakeFiles/gif.dir/gif.c.o.requires - -examples/CMakeFiles/gif.dir/gif.c.o.provides: examples/CMakeFiles/gif.dir/gif.c.o.requires - $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.o.provides.build -.PHONY : examples/CMakeFiles/gif.dir/gif.c.o.provides - -examples/CMakeFiles/gif.dir/gif.c.o.provides.build: examples/CMakeFiles/gif.dir/gif.c.o - - -# Object files for target gif -gif_OBJECTS = \ -"CMakeFiles/gif.dir/gif.c.o" - -# External object files for target gif -gif_EXTERNAL_OBJECTS = - -Bin/gif: examples/CMakeFiles/gif.dir/gif.c.o -Bin/gif: examples/CMakeFiles/gif.dir/build.make -Bin/gif: Bin/libgd.so.3.0.9 -Bin/gif: examples/CMakeFiles/gif.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/root/workspace/hanqiang/libgd_release_2.3.1/libgd/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable ../Bin/gif" - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gif.dir/link.txt --verbose=$(VERBOSE) - -# Rule to build all files generated by this target. -examples/CMakeFiles/gif.dir/build: Bin/gif - -.PHONY : examples/CMakeFiles/gif.dir/build - -examples/CMakeFiles/gif.dir/requires: examples/CMakeFiles/gif.dir/gif.c.o.requires - -.PHONY : examples/CMakeFiles/gif.dir/requires - -examples/CMakeFiles/gif.dir/clean: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples && $(CMAKE_COMMAND) -P CMakeFiles/gif.dir/cmake_clean.cmake -.PHONY : examples/CMakeFiles/gif.dir/clean - -examples/CMakeFiles/gif.dir/depend: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /root/workspace/hanqiang/libgd_release_2.3.1/libgd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples /root/workspace/hanqiang/libgd_release_2.3.1/libgd /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/CMakeFiles/gif.dir/DependInfo.cmake --color=$(COLOR) -.PHONY : examples/CMakeFiles/gif.dir/depend - diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/cmake_clean.cmake b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/cmake_clean.cmake deleted file mode 100644 index 18853e2b2be..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/gif.dir/gif.c.o" - "../Bin/gif.pdb" - "../Bin/gif" -) - -# Per-language clean rules from dependency scanning. -foreach(lang C) - include(CMakeFiles/gif.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/depend.make b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/depend.make deleted file mode 100644 index 51eb6d1e3d3..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/depend.make +++ /dev/null @@ -1,2 +0,0 @@ -# Empty dependencies file for gif. -# This may be replaced when dependencies are built. diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/flags.make b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/flags.make deleted file mode 100644 index 034b3e77b69..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/flags.make +++ /dev/null @@ -1,10 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.10 - -# compile C with /usr/bin/cc -C_FLAGS = - -C_DEFINES = -DHAVE_CONFIG_H - -C_INCLUDES = -I/root/workspace/hanqiang/libgd_release_2.3.1/libgd -I/root/workspace/hanqiang/libgd_release_2.3.1/libgd/src -I/root/workspace/hanqiang/libgd_release_2.3.1/libgd/before - diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/link.txt b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/link.txt deleted file mode 100644 index a4cd799eca8..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/link.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/cc CMakeFiles/gif.dir/gif.c.o -o ../Bin/gif -Wl,-rpath,/root/workspace/hanqiang/libgd_release_2.3.1/libgd/Bin ../Bin/libgd.so.3.0.9 diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/progress.make b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/progress.make deleted file mode 100644 index 9d087116793..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/gif.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 51 -CMAKE_PROGRESS_2 = 52 - diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/progress.marks b/Build/source/libs/gd/libgd-src/examples/CMakeFiles/progress.marks deleted file mode 100644 index e373ee695f6..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeFiles/progress.marks +++ /dev/null @@ -1 +0,0 @@ -50 diff --git a/Build/source/libs/gd/libgd-src/examples/CMakeLists.txt b/Build/source/libs/gd/libgd-src/examples/CMakeLists.txt deleted file mode 100644 index 120a8f3df4a..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -include_directories (BEFORE "${GD_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}") - -SET(TESTS_FILES - gif -) - -if (PNG_FOUND) - LIST(APPEND TEST_FILES arc crop tgaread) - - if (JPEG_FOUND) - LIST(APPEND TESTS_FILES copyrotated flip nnquant) - endif (JPEG_FOUND) -endif (PNG_FOUND) - -if (JPEG_FOUND) - LIST(APPEND TESTS_FILES resize) -endif (JPEG_FOUND) - -if (TIFF_FOUND) - LIST(APPEND TESTS_FILES tiffread) -endif (TIFF_FOUND) - -if (BUILD_SHARED_LIBS) - set(GD_LINK_LIB ${GD_LIB}) -else() - set(GD_LINK_LIB ${GD_LIB_STATIC}) -endif() - -FOREACH(test_name ${TESTS_FILES}) - add_executable(${test_name} "${test_name}.c") - target_link_libraries (${test_name} ${GD_LINK_LIB}) -ENDFOREACH(test_name) - -# Add libraries *after* we've called add_executable on all the tests. - -if (PNG_FOUND AND JPEG_FOUND) - if (UNIX) - target_link_libraries(copyrotated m) - endif (UNIX) -endif(PNG_FOUND AND JPEG_FOUND) - -if (WIN32 AND NOT MINGW AND NOT MSYS) - add_executable(windows WIN32 "windows.c") - target_link_libraries (windows ${GD_LINK_LIB}) -else (WIN32 AND NOT MINGW AND NOT MSYS) - if (MINGW OR MSYS) - add_executable(windows "windows.c") - add_definitions("-mwindows") - target_link_libraries(windows ${GD_LINK_LIB} stdc++ gdi32) - endif (MINGW OR MSYS) -endif (WIN32 AND NOT MINGW AND NOT MSYS) diff --git a/Build/source/libs/gd/libgd-src/examples/Makefile b/Build/source/libs/gd/libgd-src/examples/Makefile deleted file mode 100644 index 7e11c1fe857..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/Makefile +++ /dev/null @@ -1,254 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.10 - -# Default target executed when no arguments are given to make. -default_target: all - -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /root/workspace/hanqiang/libgd_release_2.3.1/libgd - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /root/workspace/hanqiang/libgd_release_2.3.1/libgd - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target package -package: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && /usr/bin/cpack --config ./CPackConfig.cmake -.PHONY : package - -# Special rule for the target package -package/fast: package - -.PHONY : package/fast - -# Special rule for the target package_source -package_source: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && /usr/bin/cpack --config ./CPackSourceConfig.cmake /root/workspace/hanqiang/libgd_release_2.3.1/libgd/CPackSourceConfig.cmake -.PHONY : package_source - -# Special rule for the target package_source -package_source/fast: package_source - -.PHONY : package_source/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." - /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache - -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache - -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components - -.PHONY : list_install_components/fast - -# The main all target -all: cmake_check_build_system - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(CMAKE_COMMAND) -E cmake_progress_start /root/workspace/hanqiang/libgd_release_2.3.1/libgd/CMakeFiles /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples/CMakeFiles/progress.marks - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/all - $(CMAKE_COMMAND) -E cmake_progress_start /root/workspace/hanqiang/libgd_release_2.3.1/libgd/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/clean -.PHONY : clean - -# The main clean target -clean/fast: clean - -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -examples/CMakeFiles/gif.dir/rule: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/gif.dir/rule -.PHONY : examples/CMakeFiles/gif.dir/rule - -# Convenience name for target. -gif: examples/CMakeFiles/gif.dir/rule - -.PHONY : gif - -# fast build rule for target. -gif/fast: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/build -.PHONY : gif/fast - -gif.o: gif.c.o - -.PHONY : gif.o - -# target to build an object file -gif.c.o: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.o -.PHONY : gif.c.o - -gif.i: gif.c.i - -.PHONY : gif.i - -# target to preprocess a source file -gif.c.i: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.i -.PHONY : gif.c.i - -gif.s: gif.c.s - -.PHONY : gif.s - -# target to generate assembly for a file -gif.c.s: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(MAKE) -f examples/CMakeFiles/gif.dir/build.make examples/CMakeFiles/gif.dir/gif.c.s -.PHONY : gif.c.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... install/strip" - @echo "... install/local" - @echo "... install" - @echo "... package" - @echo "... package_source" - @echo "... edit_cache" - @echo "... rebuild_cache" - @echo "... gif" - @echo "... list_install_components" - @echo "... gif.o" - @echo "... gif.i" - @echo "... gif.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /root/workspace/hanqiang/libgd_release_2.3.1/libgd && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/Build/source/libs/gd/libgd-src/examples/arc.c b/Build/source/libs/gd/libgd-src/examples/arc.c deleted file mode 100644 index 8b57c14701d..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/arc.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> - -int main() -{ - gdImagePtr im; - FILE *fp; - int cor_rad = 60; - im = gdImageCreateTrueColor(400, 400); - gdImageFilledRectangle(im, 0, 0, 399, 399, 0x00FFFFFF); - - gdImageFilledArc (im, cor_rad, 399 - cor_rad, cor_rad *2, cor_rad *2, 90, 180, 0x0, gdPie); - - fp = fopen("b.png", "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image.\n"); - gdImageDestroy(im); - return 1; - } - gdImagePng(im, fp); - fclose(fp); - - gdImageDestroy(im); - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/cmake_install.cmake b/Build/source/libs/gd/libgd-src/examples/cmake_install.cmake deleted file mode 100644 index 809a32b2515..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/cmake_install.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# Install script for directory: /root/workspace/hanqiang/libgd_release_2.3.1/libgd/examples - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Install shared libraries without execute permission? -if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - set(CMAKE_INSTALL_SO_NO_EXE "1") -endif() - -# Is this installation the result of a crosscompile? -if(NOT DEFINED CMAKE_CROSSCOMPILING) - set(CMAKE_CROSSCOMPILING "FALSE") -endif() - diff --git a/Build/source/libs/gd/libgd-src/examples/copyrotated.c b/Build/source/libs/gd/libgd-src/examples/copyrotated.c deleted file mode 100644 index 9006c0c3e12..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/copyrotated.c +++ /dev/null @@ -1,90 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> -#include <math.h> - -gdImagePtr loadImage(const char *name) -{ - FILE *fp; - gdImagePtr im; - - fp = fopen(name, "rb"); - if (!fp) { - fprintf(stderr, "Can't open jpeg file\n"); - return NULL; - } - - im = gdImageCreateFromJpeg(fp); - fclose(fp); - return im; -} - -int savePngImage(gdImagePtr im, const char *name) -{ - FILE *fp; - fp = fopen(name, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image fromtiff.png\n"); - return 0; - } - gdImagePng(im, fp); - fclose(fp); - return 1; -} - -int main(int argc, char **arg) -{ - gdImagePtr im, im2; - int new_width, new_height; - double angle, a2; - - if (argc < 3) { - fprintf(stderr, "Usage: copyrotated [angle in degree] [filename.png]\n"); - return 1; - } - angle = strtod(arg[1], 0); - im = loadImage(arg[2]); - - if (!im) { - fprintf(stderr, "Can't load PNG file <%s>", arg[1]); - return 1; - } - - /* - cos adj hyp (cos = adjacent / hypothenus) - sin op hyp (sin adjacent / hypothenus) - + 10 pixels margin - */ - - /* to radian */ - a2 = angle * .0174532925; - - new_width = fabs(ceil(cos(a2) * gdImageSX(im))) + - fabs(sin(a2) * gdImageSY(im)); - new_height = fabs(ceil(cos(a2) * gdImageSY(im))) + - fabs(sin(a2) * gdImageSX(im)); - - - im2 = gdImageCreateTrueColor(new_width, new_height); - if (!im2) { - fprintf(stderr, "Can't create a new image"); - gdImageDestroy(im); - return 1; - } - - gdImageAlphaBlending(im2, 0); - gdImageFilledRectangle(im2, 0, 0, gdImageSX(im2), gdImageSY(im2), gdTrueColorAlpha(127,0,0,127)); - - gdImageCopyRotated(im2, im, new_width/2, new_height/2, 0, 0, gdImageSX(im), gdImageSY(im), angle); - gdImageSaveAlpha(im2, 1); - if (!savePngImage(im2, "rotated.png")) { - fprintf(stderr, "Can't save PNG file rotated.png"); - gdImageDestroy(im); - gdImageDestroy(im2); - return 1; - } - - gdImageDestroy(im2); - gdImageDestroy(im); - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/crop.c b/Build/source/libs/gd/libgd-src/examples/crop.c deleted file mode 100644 index 569807c1e2e..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/crop.c +++ /dev/null @@ -1,67 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> - -void save_png(gdImagePtr im, const char *filename) -{ - FILE *fp; - fp = fopen(filename, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image %s\n", filename); - return; - } - gdImagePng(im, fp); - fclose(fp); -} - -gdImagePtr read_png(const char *filename) -{ - FILE * fp; - gdImagePtr im; - - fp = fopen(filename, "rb"); - if (!fp) { - fprintf(stderr, "Can't read png image %s\n", filename); - return NULL; - } - im = gdImageCreateFromPng(fp); - fclose(fp); - return im; -} - -int main() -{ - gdImagePtr im, im2; - - im = gdImageCreateTrueColor(400, 400); - - if (!im) { - fprintf(stderr, "Can't create 400x400 TC image\n"); - return 1; - } - - gdImageFilledRectangle(im, 19, 29, 390, 390, 0xFFFFFF); - gdImageRectangle(im, 19, 29, 390, 390, 0xFF0000); - save_png(im, "a1.png"); - - im2 = gdImageCropAuto(im, GD_CROP_SIDES); - if (im2) { - save_png(im2, "a2.png"); - gdImageDestroy(im2); - } - gdImageDestroy(im); - - im = read_png("test_crop_threshold.png"); - if (!im) { - return 1; - } - - im2 = gdImageCropThreshold(im, 0xFFFFFF, 0.6); - if (im2) { - save_png(im2, "a4.png"); - gdImageDestroy(im2); - } - - gdImageDestroy(im); - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/flip.c b/Build/source/libs/gd/libgd-src/examples/flip.c deleted file mode 100644 index 35f92cf46ec..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/flip.c +++ /dev/null @@ -1,74 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> -gdImagePtr loadImage(const char *name) -{ - FILE *fp; - gdImagePtr im; - - fp = fopen(name, "rb"); - if (!fp) { - fprintf(stderr, "Can't open jpeg file\n"); - return NULL; - } - - im = gdImageCreateFromJpeg(fp); - fclose(fp); - return im; -} - -int savePngImage(gdImagePtr im, const char *name) -{ - FILE *fp; - fp = fopen(name, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image fromtiff.png\n"); - return 0; - } - gdImagePng(im, fp); - fclose(fp); - return 1; -} - -int main(int argc, char **arg) -{ - gdImagePtr im; - int returncode = 0; - - if (argc < 2) { - fprintf(stderr, "Usage: flip [filename.png]\n"); - return 1; - } - - im = loadImage(arg[1]); - if (!im) goto error; - gdImageFlipHorizontal(im); - if (!savePngImage(im, "flip_horizontal.png")) { - goto error; - } - gdImageDestroy(im); - - im = loadImage(arg[1]); - if (!im) goto error; - gdImageFlipVertical(im); - if (!savePngImage(im, "flip_vertical.png")) { - goto error; - } - gdImageDestroy(im); - - im = loadImage(arg[1]); - if (!im) goto error; - gdImageFlipBoth(im); - if (!savePngImage(im, "flip_both.png")) { - goto error; - } - gdImageDestroy(im); - - goto done; - -error: - returncode = 1; - -done: - return returncode; -} diff --git a/Build/source/libs/gd/libgd-src/examples/gif.c b/Build/source/libs/gd/libgd-src/examples/gif.c deleted file mode 100644 index ce99c3f6a7a..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/gif.c +++ /dev/null @@ -1,52 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <gd.h> - -int main(void) -{ - int i; - FILE * out; - - gdImagePtr im; - gdImagePtr prev =NULL; - int black; - - im = gdImageCreate(100, 100); - if (!im) { - fprintf(stderr, "can't create image"); - return 1; - } - - out = fopen("anim.gif", "wb"); - if (!out) { - fprintf(stderr, "can't create file %s", "anim.gif"); - return 1; - } - - gdImageColorAllocate(im, 255, 255, 255); /* allocate white as side effect */ - gdImageGifAnimBegin(im, out, 1, -1); - - for(i = 0; i < 20; i++) { - int r,g,b; - im = gdImageCreate(100, 100); - r = rand() % 255; - g = rand() % 255; - b = rand() % 255; - - gdImageColorAllocate(im, 255, 255, 255); /* allocate white as side effect */ - black = gdImageColorAllocate(im, r, g, b); - printf("(%i, %i, %i)\n",r, g, b); - gdImageFilledRectangle(im, rand() % 100, rand() % 100, rand() % 100, rand() % 100, black); - gdImageGifAnimAdd(im, out, 1, 0, 0, 10, 1, prev); - - if(prev) { - gdImageDestroy(prev); - } - prev = im; - } - - gdImageGifAnimEnd(out); - fclose(out); - - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/nnquant.c b/Build/source/libs/gd/libgd-src/examples/nnquant.c deleted file mode 100644 index 82e36729c6b..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/nnquant.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> - -void save_png(gdImagePtr im, const char *filename) -{ - FILE *fp; - fp = fopen(filename, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image %s\n", filename); - return; - } - gdImagePng(im, fp); - fclose(fp); -} - -int main() -{ - gdImagePtr im, im2; - FILE *fp; - char path[2048]; - - fp=fopen("resampledbug.jpeg", "rb"); - if (!fp) { - fprintf(stderr, "Can't load /home/pierre/IM3801.jpg\n"); - return 1; - } - - im = gdImageCreateFromJpeg(fp); - fclose(fp); - if (!im) { - fprintf(stderr, "Can't load TIFF image %s\n", path); - return 1; - } - - im2 = gdImageNeuQuant(im, 256, 3); - - if (im2) { - gdImageSaveAlpha(im2, 1); - save_png(im2, "a_nnquant.png"); - gdImageDestroy(im2); - } else { - printf("neu quant failed.\n"); - } - - gdImageTrueColorToPalette(im, 1, 256); - - gdImageSaveAlpha(im, 1); - save_png(im, "a_jquant_dither.png"); - - gdImageDestroy(im); - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/noIcon.pic b/Build/source/libs/gd/libgd-src/examples/noIcon.pic Binary files differdeleted file mode 100644 index 8335d3a2a28..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/noIcon.pic +++ /dev/null diff --git a/Build/source/libs/gd/libgd-src/examples/noIcon.sgi b/Build/source/libs/gd/libgd-src/examples/noIcon.sgi Binary files differdeleted file mode 100644 index 98aac523c10..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/noIcon.sgi +++ /dev/null diff --git a/Build/source/libs/gd/libgd-src/examples/noIcon.tga b/Build/source/libs/gd/libgd-src/examples/noIcon.tga Binary files differdeleted file mode 100644 index 7063fac97bf..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/noIcon.tga +++ /dev/null diff --git a/Build/source/libs/gd/libgd-src/examples/noIconAlpha.tga b/Build/source/libs/gd/libgd-src/examples/noIconAlpha.tga Binary files differdeleted file mode 100644 index 3af87b47b67..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/noIconAlpha.tga +++ /dev/null diff --git a/Build/source/libs/gd/libgd-src/examples/resize.c b/Build/source/libs/gd/libgd-src/examples/resize.c deleted file mode 100644 index 8bc3ff7ddcc..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/resize.c +++ /dev/null @@ -1,59 +0,0 @@ -#include "gd.h" -#include <stdio.h> -#include <stdlib.h> - -int main (int argc, char *argv[]) { - FILE *fp; - gdImagePtr in, out; - int w, h; - - /* Help */ - if (argc<=4) { - printf("%s input.jpg output.jpg width height\n", argv[0]); - return 1; - } - - /* Size */ - w = atoi(argv[3]); - h = atoi(argv[4]); - if (w<=0 || h<=0) { - fprintf(stderr, "Bad size %dx%d\n", h, w); - return 2; - } - - /* Input */ - fp = fopen(argv[1], "rb"); - if (!fp) { - fprintf(stderr, "Can't read image %s\n", argv[1]); - return 3; - } - in = gdImageCreateFromJpeg(fp); - fclose(fp); - if (!in) { - fprintf(stderr, "Can't create image from %s\n", argv[1]); - return 4; - } - - /* Resize */ - gdImageSetInterpolationMethod(in, GD_BILINEAR_FIXED); - out = gdImageScale(in, w, h); - if (!out) { - fprintf(stderr, "gdImageScale fails\n"); - return 5; - } - - /* Output */ - fp = fopen(argv[2], "wb"); - if (!fp) { - fprintf(stderr, "Can't save image %s\n", argv[2]); - return 6; - } - gdImageJpeg(out, fp, 90); - fclose(fp); - - /* Cleanups */ - gdImageDestroy(in); - gdImageDestroy(out); - - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/test_crop_threshold.png b/Build/source/libs/gd/libgd-src/examples/test_crop_threshold.png Binary files differdeleted file mode 100644 index 4a9dff1a815..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/test_crop_threshold.png +++ /dev/null diff --git a/Build/source/libs/gd/libgd-src/examples/tgaread.c b/Build/source/libs/gd/libgd-src/examples/tgaread.c deleted file mode 100644 index 859f4d4254b..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/tgaread.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * You can fetch a set of samples TIFF images here: - * ftp://ftp.remotesensing.org/pub/libtiff/ - * (pics-x.y.z.tar.gz) - */ - -#include <gd.h> -#include <stdio.h> -#include <stdlib.h> - -int main() -{ - gdImagePtr im; - FILE *fp; - char path[4][2048]; - int i; - char dst[2048]; - - sprintf(path[0], "noIconAlpha.tga"); - sprintf(path[1], "noIcon.tga"); - - for (i = 0; i < 2; i++) { - printf("opening %s\n", path[i]); - fp = fopen(path[i], "rb"); - if (!fp) { - printf("failed, cannot open file\n"); - return 1; - } - - im = gdImageCreateFromTga(fp); - fclose(fp); - if (!im) { - fprintf(stderr, "Can't load TIFF image %s\n", path[i]); - return 1; - } - - - sprintf(dst, "%i.png", i); - - fp = fopen(dst, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image fromtiff.png\n"); - gdImageDestroy(im); - return 1; - } - gdImagePng(im, fp); - fclose(fp); - gdImageDestroy(im); - } - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/tiffread.c b/Build/source/libs/gd/libgd-src/examples/tiffread.c deleted file mode 100644 index f1d78369be5..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/tiffread.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * You can fetch a set of samples TIFF images here: - * ftp://ftp.remotesensing.org/pub/libtiff/ - * (pics-x.y.z.tar.gz) - */ - -#include <gd.h> -#include <stdio.h> -#include <stdlib.h> -int main() -{ - gdImagePtr im; - FILE *fp; - char path[9][2048]; - int i; - char dst[2048]; - - sprintf(path[0], "cramps-tile.tif"); - sprintf(path[1], "cramps.tif"); - sprintf(path[2], "ycbcr-cat.tif"); - sprintf(path[3], "jello.tif"); - sprintf(path[4], "caspian.tif"); - sprintf(path[5], "strike.tif"); - sprintf(path[6], "off_luv24.tif"); - sprintf(path[7], "off_l16.tif"); - sprintf(path[8], "fax2d.tif"); - - for (i = 0; i < 9; i++) { - printf("opening %s\n", path[i]); - fp = fopen(path[i], "rb"); - if (!fp) { - printf("failed, cannot open file\n"); - return 1; - } - - im = gdImageCreateFromTiff(fp); - fclose(fp); - if (!im) { - fprintf(stderr, "Can't load TIFF image %s\n", path[i]); - return 1; - } - - - sprintf(dst, "%i.png", i); - - fp = fopen(dst, "wb"); - if (!fp) { - fprintf(stderr, "Can't save png image fromtiff.png\n"); - gdImageDestroy(im); - return 1; - } - - gdImagePng(im, fp); - fclose(fp); - gdImageDestroy(im); - } - return 0; -} diff --git a/Build/source/libs/gd/libgd-src/examples/windows.c b/Build/source/libs/gd/libgd-src/examples/windows.c deleted file mode 100644 index d68d7a1eb5c..00000000000 --- a/Build/source/libs/gd/libgd-src/examples/windows.c +++ /dev/null @@ -1,310 +0,0 @@ -/* -Sample usage of GD on windows. This little program opens a window, fetch its DIB -and assigns to a GD truecolor image. - -Thanks to Mateusz Loskot (http://mateusz.loskot.net) for the AttachBuffer function! -*/ -#include <windows.h> -#include <gd.h> -#include <gdfontg.h> -#include <gdfontl.h> - - -gdImagePtr gdImageTrueColorAttachBuffer(int* buffer, int sx, int sy, int stride) -{ - int i; - int height; - int* rowptr; - gdImagePtr im; - im = (gdImage *) malloc (sizeof (gdImage)); - if (!im) { - return 0; - } - memset (im, 0, sizeof (gdImage)); - -#if 0 - if (overflow2(sizeof (int *), sy)) { - return 0; - } -#endif - - im->tpixels = (int **) malloc (sizeof (int *) * sy); - if (!im->tpixels) { - free(im); - return 0; - } - - im->polyInts = 0; - im->polyAllocated = 0; - im->brush = 0; - im->tile = 0; - im->style = 0; - - height = sy; - rowptr = buffer; - if (stride < 0) { - int startoff = (height - 1) * stride; - rowptr = buffer - startoff; - } - - i = 0; - while (height--) { - im->tpixels[i] = rowptr; - rowptr += stride; - i++; - } - - im->sx = sx; - im->sy = sy; - im->transparent = (-1); - im->interlace = 0; - im->trueColor = 1; - im->saveAlphaFlag = 0; - im->alphaBlendingFlag = 1; - im->thick = 1; - im->AA = 0; - im->cx1 = 0; - im->cy1 = 0; - im->cx2 = im->sx - 1; - im->cy2 = im->sy - 1; - return im; -} - -void gdImageDetachBuffer(gdImagePtr im) -{ - free(im->tpixels); - free(im); -} - - -BITMAPINFO gdCreateBmp(int width, int height) -{ - BITMAPINFO bmp_info; - - // Configure bitmap properties - - ZeroMemory(&bmp_info, sizeof(BITMAPINFO)); - bmp_info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmp_info.bmiHeader.biWidth = width; - bmp_info.bmiHeader.biHeight = height; - bmp_info.bmiHeader.biPlanes = 1; - bmp_info.bmiHeader.biBitCount = 32; - bmp_info.bmiHeader.biCompression = BI_RGB; - bmp_info.bmiHeader.biSizeImage = 0; - bmp_info.bmiHeader.biXPelsPerMeter = 0; - bmp_info.bmiHeader.biYPelsPerMeter = 0; - bmp_info.bmiHeader.biClrUsed = 0; - bmp_info.bmiHeader.biClrImportant = 0; - return bmp_info; -} - -LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; - -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, - PSTR szCmdLine, int iCmdShow) -{ - static TCHAR szAppName[] = TEXT ("Bezier") ; - HWND hwnd ; - MSG msg ; - WNDCLASS wndclass ; - - wndclass.style = CS_HREDRAW | CS_VREDRAW ; - wndclass.lpfnWndProc = WndProc ; - wndclass.cbClsExtra = 0 ; - wndclass.cbWndExtra = 0 ; - wndclass.hInstance = hInstance ; - wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ; - wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ; - wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ; - wndclass.lpszMenuName = NULL ; - wndclass.lpszClassName = szAppName ; - - if (!RegisterClass (&wndclass)) { - // UNICODE-Compilierung ist die einzige realistische Fehlermöglichkeit - MessageBox (NULL, TEXT ("Programm arbeitet mit Unicode und setzt Windows NT voraus!"), - szAppName, MB_ICONERROR) ; - return 0 ; - } - - hwnd = CreateWindow (szAppName, TEXT ("Bezierkurven"), - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, hInstance, NULL) ; - - ShowWindow (hwnd, iCmdShow) ; - UpdateWindow (hwnd) ; - - while (GetMessage (&msg, NULL, 0, 0)) { - TranslateMessage (&msg) ; - DispatchMessage (&msg) ; - } - return msg.wParam ; -} - -void DrawBezier (HDC hdc, POINT apt[]) -{ - PolyBezier (hdc, apt, 4) ; - - MoveToEx (hdc, apt[0].x, apt[0].y, NULL) ; - LineTo (hdc, apt[1].x, apt[1].y) ; - - MoveToEx (hdc, apt[2].x, apt[2].y, NULL) ; - LineTo (hdc, apt[3].x, apt[3].y) ; -} - - -void gdDrawImage(HDC hdc, RECT *rc) -{ - HDC mem_dc; - BITMAPINFO bmp_info; - void* bits; - HBITMAP bmp, temp; - gdImagePtr im; - int width, height, stride; - int white, black, blue, red; - char *s = "Hello world!"; - gdFontPtr lfont, gfont; - - width = rc->right - rc->left; - height = rc->bottom - rc->top; - - bmp_info = gdCreateBmp(width, height); - - // Create memory device context - mem_dc = CreateCompatibleDC(hdc); - if (!mem_dc) { - MessageBox(NULL, "Can't create a compatible DC!", "Error!", MB_ICONEXCLAMATION | MB_OK); - return; - } - - // bits points to a shared buffer of pixels - bits = NULL; - bmp = CreateDIBSection(mem_dc, &bmp_info, DIB_RGB_COLORS, (void**)&bits, 0, 0); - - // Selecting the object before doing anything allows you to use libgd - // together with native Windows GDI. - temp = (HBITMAP)SelectObject(mem_dc, bmp); - - /*stride = ((width * 1 + 3) >> 2) << 2;*/ - // always uses 32bit in BMPINFO - stride = width; - im = NULL; - - // Attach shared buffer of pixels to GD image - // Negative stride places 0,0 in upper-left corner - im = gdImageTrueColorAttachBuffer((int*)bits, width, height, -stride); - if (!im) { - MessageBox(NULL, "GD image creation failed!", "Error!", MB_ICONEXCLAMATION | MB_OK); - return; - } - - // Start of GD drawing - white = gdImageColorAllocate(im, 255, 255, 255); - black = gdImageColorAllocate(im, 0, 0, 0); - blue = gdImageColorAllocate(im, 0, 0, 255); - - // Allocate the color red, 50% transparent. - red = gdImageColorAllocateAlpha(im, 255, 0, 0, 64); - - // Erase background with white color - gdImageFilledRectangle(im, 0, 0, width, height, 0xFF0000); - - lfont = gdFontGetLarge(); - gfont = gdFontGetGiant(); - - // Draw a dashed line from the upper left corner to the lower right corner. - gdImageFilledRectangle(im, 25, 25, 100, 100, blue); - - gdImageChar(im, gfont, 35, 35, 'Q', white); - gdImageFilledRectangle(im, 50, 50, 75, 175, red); - gdImageLine(im, 0, 0, 150, 150, black); - - gdImageString(im, gdFontGetLarge(), - im->sx / 2 - (strlen(s) * lfont->w / 2), - im->sy / 2 - lfont->h / 2, - (unsigned char*)s, black); - - // Copy drawing from memory context (shared bitmap buffer) to screen DC. - BitBlt(hdc, rc->left, rc->top, width, height, mem_dc, 0, 0, SRCCOPY); - - // Free - gdImageDetachBuffer(im); - SelectObject(mem_dc, temp); - DeleteObject(bmp); - DeleteObject(mem_dc); -} - -LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static POINT apt[4] ; - HDC hdc ; - int cxClient, cyClient ; - PAINTSTRUCT ps ; - RECT rc; - - GetClientRect(hwnd, &rc); - - switch (message) { - case WM_SIZE: - cxClient = LOWORD (lParam) ; - cyClient = HIWORD (lParam) ; - - apt[0].x = cxClient / 4 ; - apt[0].y = cyClient / 2 ; - - apt[1].x = cxClient / 2 ; - apt[1].y = cyClient / 4 ; - - apt[2].x = cxClient / 2 ; - apt[2].y = 3 * cyClient / 4 ; - - apt[3].x = 3 * cxClient / 4 ; - apt[3].y = cyClient / 2 ; - return 0 ; - - case WM_LBUTTONDOWN: - case WM_RBUTTONDOWN: - case WM_MOUSEMOVE: - if (wParam & MK_LBUTTON || wParam & MK_RBUTTON) { - hdc = GetDC (hwnd) ; - - // alte Kurve löschen (mit Weiß übermalen) - SelectObject (hdc, GetStockObject (WHITE_PEN)) ; - DrawBezier (hdc, apt) ; - - if (wParam & MK_LBUTTON) { - apt[1].x = LOWORD (lParam) ; - apt[1].y = HIWORD (lParam) ; - } - - if (wParam & MK_RBUTTON) { - apt[2].x = LOWORD (lParam) ; - apt[2].y = HIWORD (lParam) ; - } - - // neue Kurve (mit Schwarz) zeichnen - SelectObject (hdc, GetStockObject (BLACK_PEN)) ; - gdDrawImage(hdc, &rc); - DrawBezier (hdc, apt) ; - ReleaseDC (hwnd, hdc) ; - } - return 0 ; - - - case WM_PAINT: - hdc = BeginPaint (hwnd, &ps) ; - - GetClientRect(hwnd, &rc); - gdDrawImage(hdc, &rc); - DrawBezier (hdc, apt) ; - - EndPaint (hwnd, &ps) ; - return 0 ; - - case WM_DESTROY: - PostQuitMessage (0) ; - return 0 ; - } - return DefWindowProc (hwnd, message, wParam, lParam) ; -} |