diff --git a/assdraw/Makefile.am b/assdraw/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..af437a64d6d80a47ea903fd842a648fc59cbcd9a --- /dev/null +++ b/assdraw/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/assdraw/assdraw_2008.vcproj b/assdraw/assdraw_2008.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..9f5c5083f9e59445808772ef340ae3b8e9c9324b --- /dev/null +++ b/assdraw/assdraw_2008.vcproj @@ -0,0 +1,473 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="assdraw_2008" + ProjectGUID="{3BC75951-691C-4703-A29A-D29E298248AC}" + RootNamespace="assdraw" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../bin/assdraw3_d.exe" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\assdraw3_d_x64.exe" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../bin/assdraw3.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)\assdraw3_x64.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\src\agg_bcspline.cpp" + > + </File> + <File + RelativePath=".\src\agg_vcgen_bcspline.cpp" + > + </File> + <File + RelativePath=".\src\wxAGG\AGGWindow.cpp" + > + </File> + <File + RelativePath=".\src\assdraw.cpp" + > + </File> + <File + RelativePath=".\src\assdraw_settings.cpp" + > + </File> + <File + RelativePath=".\src\canvas.cpp" + > + </File> + <File + RelativePath=".\src\canvas_mouse.cpp" + > + </File> + <File + RelativePath=".\src\cmd.cpp" + > + </File> + <File + RelativePath=".\src\dlgctrl.cpp" + > + </File> + <File + RelativePath=".\src\engine.cpp" + > + </File> + <File + RelativePath=".\src\library.cpp" + > + </File> + <File + RelativePath=".\src\settings.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\src\_common.hpp" + > + </File> + <File + RelativePath=".\src\agg_bcspline.h" + > + </File> + <File + RelativePath=".\src\agg_conv_bcspline.h" + > + </File> + <File + RelativePath=".\src\agg_vcgen_bcspline.h" + > + </File> + <File + RelativePath=".\src\agghelper.hpp" + > + </File> + <File + RelativePath=".\src\wxAGG\AGGWindow.h" + > + </File> + <File + RelativePath=".\src\assdraw.hpp" + > + </File> + <File + RelativePath=".\src\canvas.hpp" + > + </File> + <File + RelativePath=".\src\canvas_mouse.hpp" + > + </File> + <File + RelativePath=".\src\cmd.hpp" + > + </File> + <File + RelativePath=".\src\dlgctrl.hpp" + > + </File> + <File + RelativePath=".\src\engine.hpp" + > + </File> + <File + RelativePath=".\src\enums.hpp" + > + </File> + <File + RelativePath=".\src\include_once.hpp" + > + </File> + <File + RelativePath=".\src\library.hpp" + > + </File> + <File + RelativePath=".\src\wxAGG\PixelFormatConvertor.h" + > + </File> + <File + RelativePath=".\src\resource.h" + > + </File> + <File + RelativePath=".\src\settings.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\src\assdraw.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/assdraw/autogen.sh b/assdraw/autogen.sh new file mode 100755 index 0000000000000000000000000000000000000000..5bce9bab38baa893f0a2e03a919fbf353418439f --- /dev/null +++ b/assdraw/autogen.sh @@ -0,0 +1,1578 @@ +#!/bin/sh +# a u t o g e n . s h +# +# Copyright (c) 2005-2009 United States Government as represented by +# the U.S. Army Research Laboratory. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# 3. The name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +### +# +# Script for automatically preparing the sources for compilation by +# performing the myriad of necessary steps. The script attempts to +# detect proper version support, and outputs warnings about particular +# systems that have autotool peculiarities. +# +# Basically, if everything is set up and installed correctly, the +# script will validate that minimum versions of the GNU Build System +# tools are installed, account for several common configuration +# issues, and then simply run autoreconf for you. +# +# If autoreconf fails, which can happen for many valid configurations, +# this script proceeds to run manual preparation steps effectively +# providing a POSIX shell script (mostly complete) reimplementation of +# autoreconf. +# +# The AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER +# environment variables and corresponding _OPTIONS variables (e.g. +# AUTORECONF_OPTIONS) may be used to override the default automatic +# detection behaviors. Similarly the _VERSION variables will override +# the minimum required version numbers. +# +# Examples: +# +# To obtain help on usage: +# ./autogen.sh --help +# +# To obtain verbose output: +# ./autogen.sh --verbose +# +# To skip autoreconf and prepare manually: +# AUTORECONF=false ./autogen.sh +# +# To verbosely try running with an older (unsupported) autoconf: +# AUTOCONF_VERSION=2.50 ./autogen.sh --verbose +# +# Author: +# Christopher Sean Morrison <morrison@brlcad.org> +# +# Patches: +# Sebastian Pipping <sebastian@pipping.org> +# +###################################################################### + +# set to minimum acceptable version of autoconf +if [ "x$AUTOCONF_VERSION" = "x" ] ; then + AUTOCONF_VERSION=2.52 +fi +# set to minimum acceptable version of automake +if [ "x$AUTOMAKE_VERSION" = "x" ] ; then + AUTOMAKE_VERSION=1.6.0 +fi +# set to minimum acceptable version of libtool +if [ "x$LIBTOOL_VERSION" = "x" ] ; then + LIBTOOL_VERSION=1.4.2 +fi + + +################## +# ident function # +################## +ident ( ) { + # extract copyright from header + __copyright="`grep Copyright $AUTOGEN_SH | head -${HEAD_N}1 | awk '{print $4}'`" + if [ "x$__copyright" = "x" ] ; then + __copyright="`date +%Y`" + fi + + # extract version from CVS Id string + __id="$Id: autogen.sh 33925 2009-03-01 23:27:06Z brlcad $" + __version="`echo $__id | sed 's/.*\([0-9][0-9][0-9][0-9]\)[-\/]\([0-9][0-9]\)[-\/]\([0-9][0-9]\).*/\1\2\3/'`" + if [ "x$__version" = "x" ] ; then + __version="" + fi + + echo "autogen.sh build preparation script by Christopher Sean Morrison" + echo " + config.guess download patch by Sebastian Pipping (2008-12-03)" + echo "revised 3-clause BSD-style license, copyright (c) $__copyright" + echo "script version $__version, ISO/IEC 9945 POSIX shell script" +} + + +################## +# USAGE FUNCTION # +################## +usage ( ) { + echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [-d|--download] [--version]" + echo " --help Help on $NAME_OF_AUTOGEN usage" + echo " --verbose Verbose progress output" + echo " --quiet Quiet suppressed progress output" + echo " --download Download the latest config.guess from gnulib" + echo " --version Only perform GNU Build System version checks" + echo + echo "Description: This script will validate that minimum versions of the" + echo "GNU Build System tools are installed and then run autoreconf for you." + echo "Should autoreconf fail, manual preparation steps will be run" + echo "potentially accounting for several common preparation issues. The" + + echo "AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER," + echo "PROJECT, & CONFIGURE environment variables and corresponding _OPTIONS" + echo "variables (e.g. AUTORECONF_OPTIONS) may be used to override the" + echo "default automatic detection behavior." + echo + + ident + + return 0 +} + + +########################## +# VERSION_ERROR FUNCTION # +########################## +version_error ( ) { + if [ "x$1" = "x" ] ; then + echo "INTERNAL ERROR: version_error was not provided a version" + exit 1 + fi + if [ "x$2" = "x" ] ; then + echo "INTERNAL ERROR: version_error was not provided an application name" + exit 1 + fi + $ECHO + $ECHO "ERROR: To prepare the ${PROJECT} build system from scratch," + $ECHO " at least version $1 of $2 must be installed." + $ECHO + $ECHO "$NAME_OF_AUTOGEN does not need to be run on the same machine that will" + $ECHO "run configure or make. Either the GNU Autotools will need to be installed" + $ECHO "or upgraded on this system, or $NAME_OF_AUTOGEN must be run on the source" + $ECHO "code on another system and then transferred to here. -- Cheers!" + $ECHO +} + +########################## +# VERSION_CHECK FUNCTION # +########################## +version_check ( ) { + if [ "x$1" = "x" ] ; then + echo "INTERNAL ERROR: version_check was not provided a minimum version" + exit 1 + fi + _min="$1" + if [ "x$2" = "x" ] ; then + echo "INTERNAL ERROR: version check was not provided a comparison version" + exit 1 + fi + _cur="$2" + + # needed to handle versions like 1.10 and 1.4-p6 + _min="`echo ${_min}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" + _cur="`echo ${_cur}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" + + _min_major="`echo $_min | cut -d. -f1`" + _min_minor="`echo $_min | cut -d. -f2`" + _min_patch="`echo $_min | cut -d. -f3`" + + _cur_major="`echo $_cur | cut -d. -f1`" + _cur_minor="`echo $_cur | cut -d. -f2`" + _cur_patch="`echo $_cur | cut -d. -f3`" + + if [ "x$_min_major" = "x" ] ; then + _min_major=0 + fi + if [ "x$_min_minor" = "x" ] ; then + _min_minor=0 + fi + if [ "x$_min_patch" = "x" ] ; then + _min_patch=0 + fi + if [ "x$_cur_minor" = "x" ] ; then + _cur_major=0 + fi + if [ "x$_cur_minor" = "x" ] ; then + _cur_minor=0 + fi + if [ "x$_cur_patch" = "x" ] ; then + _cur_patch=0 + fi + + $VERBOSE_ECHO "Checking if ${_cur_major}.${_cur_minor}.${_cur_patch} is greater than ${_min_major}.${_min_minor}.${_min_patch}" + + if [ $_min_major -lt $_cur_major ] ; then + return 0 + elif [ $_min_major -eq $_cur_major ] ; then + if [ $_min_minor -lt $_cur_minor ] ; then + return 0 + elif [ $_min_minor -eq $_cur_minor ] ; then + if [ $_min_patch -lt $_cur_patch ] ; then + return 0 + elif [ $_min_patch -eq $_cur_patch ] ; then + return 0 + fi + fi + fi + return 1 +} + + +###################################### +# LOCATE_CONFIGURE_TEMPLATE FUNCTION # +###################################### +locate_configure_template ( ) { + _pwd="`pwd`" + if test -f "./configure.ac" ; then + echo "./configure.ac" + elif test -f "./configure.in" ; then + echo "./configure.in" + elif test -f "$_pwd/configure.ac" ; then + echo "$_pwd/configure.ac" + elif test -f "$_pwd/configure.in" ; then + echo "$_pwd/configure.in" + elif test -f "$PATH_TO_AUTOGEN/configure.ac" ; then + echo "$PATH_TO_AUTOGEN/configure.ac" + elif test -f "$PATH_TO_AUTOGEN/configure.in" ; then + echo "$PATH_TO_AUTOGEN/configure.in" + fi +} + + +################## +# argument check # +################## +ARGS="$*" +PATH_TO_AUTOGEN="`dirname $0`" +NAME_OF_AUTOGEN="`basename $0`" +AUTOGEN_SH="$PATH_TO_AUTOGEN/$NAME_OF_AUTOGEN" + +LIBTOOL_M4="${PATH_TO_AUTOGEN}/misc/libtool.m4" + +if [ "x$HELP" = "x" ] ; then + HELP=no +fi +if [ "x$QUIET" = "x" ] ; then + QUIET=no +fi +if [ "x$VERBOSE" = "x" ] ; then + VERBOSE=no +fi +if [ "x$VERSION_ONLY" = "x" ] ; then + VERSION_ONLY=no +fi +if [ "x$DOWNLOAD" = "x" ] ; then + DOWNLOAD=no +fi +if [ "x$AUTORECONF_OPTIONS" = "x" ] ; then + AUTORECONF_OPTIONS="-i -f" +fi +if [ "x$AUTOCONF_OPTIONS" = "x" ] ; then + AUTOCONF_OPTIONS="-f" +fi +if [ "x$AUTOMAKE_OPTIONS" = "x" ] ; then + AUTOMAKE_OPTIONS="-a -c -f" +fi +ALT_AUTOMAKE_OPTIONS="-a -c" +if [ "x$LIBTOOLIZE_OPTIONS" = "x" ] ; then + LIBTOOLIZE_OPTIONS="--automake -c -f" +fi +ALT_LIBTOOLIZE_OPTIONS="--automake --copy --force" +if [ "x$ACLOCAL_OPTIONS" = "x" ] ; then + ACLOCAL_OPTIONS="" +fi +if [ "x$AUTOHEADER_OPTIONS" = "x" ] ; then + AUTOHEADER_OPTIONS="" +fi +if [ "x$CONFIG_GUESS_URL" = "x" ] ; then + CONFIG_GUESS_URL="http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.guess;hb=HEAD" +fi +for arg in $ARGS ; do + case "x$arg" in + x--help) HELP=yes ;; + x-[hH]) HELP=yes ;; + x--quiet) QUIET=yes ;; + x-[qQ]) QUIET=yes ;; + x--verbose) VERBOSE=yes ;; + x-[dD]) DOWNLOAD=yes ;; + x--download) DOWNLOAD=yes ;; + x-[vV]) VERBOSE=yes ;; + x--version) VERSION_ONLY=yes ;; + *) + echo "Unknown option: $arg" + echo + usage + exit 1 + ;; + esac +done + + +##################### +# environment check # +##################### + +# sanity check before recursions potentially begin +if [ ! -f "$AUTOGEN_SH" ] ; then + echo "INTERNAL ERROR: $AUTOGEN_SH does not exist" + if [ ! "x$0" = "x$AUTOGEN_SH" ] ; then + echo "INTERNAL ERROR: dirname/basename inconsistency: $0 != $AUTOGEN_SH" + fi + exit 1 +fi + +# force locale setting to C so things like date output as expected +LC_ALL=C + +# commands that this script expects +for __cmd in echo head tail pwd ; do + echo "test" | $__cmd > /dev/null 2>&1 + if [ $? != 0 ] ; then + echo "INTERNAL ERROR: '${__cmd}' command is required" + exit 2 + fi +done +echo "test" | grep "test" > /dev/null 2>&1 +if test ! x$? = x0 ; then + echo "INTERNAL ERROR: grep command is required" + exit 1 +fi +echo "test" | sed "s/test/test/" > /dev/null 2>&1 +if test ! x$? = x0 ; then + echo "INTERNAL ERROR: sed command is required" + exit 1 +fi + + +# determine the behavior of echo +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +# determine the behavior of head +case "x`echo 'head' | head -n 1 2>&1`" in + *xhead*) HEAD_N="n " ;; + *) HEAD_N="" ;; +esac + +# determine the behavior of tail +case "x`echo 'tail' | tail -n 1 2>&1`" in + *xtail*) TAIL_N="n " ;; + *) TAIL_N="" ;; +esac + +VERBOSE_ECHO=: +ECHO=: +if [ "x$QUIET" = "xyes" ] ; then + if [ "x$VERBOSE" = "xyes" ] ; then + echo "Verbose output quelled by quiet option. Further output disabled." + fi +else + ECHO=echo + if [ "x$VERBOSE" = "xyes" ] ; then + echo "Verbose output enabled" + VERBOSE_ECHO=echo + fi +fi + + +# allow a recursive run to disable further recursions +if [ "x$RUN_RECURSIVE" = "x" ] ; then + RUN_RECURSIVE=yes +fi + + +################################################ +# check for help arg and bypass version checks # +################################################ +if [ "x`echo $ARGS | sed 's/.*[hH][eE][lL][pP].*/help/'`" = "xhelp" ] ; then + HELP=yes +fi +if [ "x$HELP" = "xyes" ] ; then + usage + $ECHO "---" + $ECHO "Help was requested. No preparation or configuration will be performed." + exit 0 +fi + + +####################### +# set up signal traps # +####################### +untrap_abnormal ( ) { + for sig in 1 2 13 15; do + trap - $sig + done +} + +# do this cleanup whenever we exit. +trap ' + # start from the root + if test -d "$START_PATH" ; then + cd "$START_PATH" + fi + + # restore/delete backup files + if test "x$PFC_INIT" = "x1" ; then + recursive_restore + fi +' 0 + +# trap SIGHUP (1), SIGINT (2), SIGPIPE (13), SIGTERM (15) +for sig in 1 2 13 15; do + trap ' + $ECHO "" + $ECHO "Aborting $NAME_OF_AUTOGEN: caught signal '$sig'" + + # start from the root + if test -d "$START_PATH" ; then + cd "$START_PATH" + fi + + # clean up on abnormal exit + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + + if test -f "acinclude.m4.$$.backup" ; then + $VERBOSE_ECHO "cat acinclude.m4.$$.backup > acinclude.m4" + chmod u+w acinclude.m4 + cat acinclude.m4.$$.backup > acinclude.m4 + + $VERBOSE_ECHO "rm -f acinclude.m4.$$.backup" + rm -f acinclude.m4.$$.backup + fi + + { (exit 1); exit 1; } +' $sig +done + + +############################# +# look for a configure file # +############################# +if [ "x$CONFIGURE" = "x" ] ; then + CONFIGURE="`locate_configure_template`" + if [ ! "x$CONFIGURE" = "x" ] ; then + $VERBOSE_ECHO "Found a configure template: $CONFIGURE" + fi +else + $ECHO "Using CONFIGURE environment variable override: $CONFIGURE" +fi +if [ "x$CONFIGURE" = "x" ] ; then + if [ "x$VERSION_ONLY" = "xyes" ] ; then + CONFIGURE=/dev/null + else + $ECHO + $ECHO "A configure.ac or configure.in file could not be located implying" + $ECHO "that the GNU Build System is at least not used in this directory. In" + $ECHO "any case, there is nothing to do here without one of those files." + $ECHO + $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" + exit 1 + fi +fi + +#################### +# get project name # +#################### +if [ "x$PROJECT" = "x" ] ; then + PROJECT="`grep AC_INIT $CONFIGURE | grep -v '.*#.*AC_INIT' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_INIT(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if [ "x$PROJECT" = "xAC_INIT" ] ; then + # projects might be using the older/deprecated arg-less AC_INIT .. look for AM_INIT_AUTOMAKE instead + PROJECT="`grep AM_INIT_AUTOMAKE $CONFIGURE | grep -v '.*#.*AM_INIT_AUTOMAKE' | tail -${TAIL_N}1 | sed 's/^[ ]*AM_INIT_AUTOMAKE(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + fi + if [ "x$PROJECT" = "xAM_INIT_AUTOMAKE" ] ; then + PROJECT="project" + fi + if [ "x$PROJECT" = "x" ] ; then + PROJECT="project" + fi +else + $ECHO "Using PROJECT environment variable override: $PROJECT" +fi +$ECHO "Preparing the $PROJECT build system...please wait" +$ECHO + + +######################## +# check for autoreconf # +######################## +HAVE_AUTORECONF=no +if [ "x$AUTORECONF" = "x" ] ; then + for AUTORECONF in autoreconf ; do + $VERBOSE_ECHO "Checking autoreconf version: $AUTORECONF --version" + $AUTORECONF --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + HAVE_AUTORECONF=yes + break + fi + done +else + HAVE_AUTORECONF=yes + $ECHO "Using AUTORECONF environment variable override: $AUTORECONF" +fi + + +########################## +# autoconf version check # +########################## +_acfound=no +if [ "x$AUTOCONF" = "x" ] ; then + for AUTOCONF in autoconf ; do + $VERBOSE_ECHO "Checking autoconf version: $AUTOCONF --version" + $AUTOCONF --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + _acfound=yes + break + fi + done +else + _acfound=yes + $ECHO "Using AUTOCONF environment variable override: $AUTOCONF" +fi + +_report_error=no +if [ ! "x$_acfound" = "xyes" ] ; then + $ECHO "ERROR: Unable to locate GNU Autoconf." + _report_error=yes +else + _version="`$AUTOCONF --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Autoconf version $_version" + version_check "$AUTOCONF_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$AUTOCONF_VERSION" "GNU Autoconf" + exit 1 +fi + + +########################## +# automake version check # +########################## +_amfound=no +if [ "x$AUTOMAKE" = "x" ] ; then + for AUTOMAKE in automake ; do + $VERBOSE_ECHO "Checking automake version: $AUTOMAKE --version" + $AUTOMAKE --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + _amfound=yes + break + fi + done +else + _amfound=yes + $ECHO "Using AUTOMAKE environment variable override: $AUTOMAKE" +fi + + +_report_error=no +if [ ! "x$_amfound" = "xyes" ] ; then + $ECHO + $ECHO "ERROR: Unable to locate GNU Automake." + _report_error=yes +else + _version="`$AUTOMAKE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Automake version $_version" + version_check "$AUTOMAKE_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$AUTOMAKE_VERSION" "GNU Automake" + exit 1 +fi + + +######################## +# check for libtoolize # +######################## +HAVE_LIBTOOLIZE=yes +HAVE_ALT_LIBTOOLIZE=no +_ltfound=no +if [ "x$LIBTOOLIZE" = "x" ] ; then + LIBTOOLIZE=libtoolize + $VERBOSE_ECHO "Checking libtoolize version: $LIBTOOLIZE --version" + $LIBTOOLIZE --version > /dev/null 2>&1 + if [ ! $? = 0 ] ; then + HAVE_LIBTOOLIZE=no + $ECHO + if [ "x$HAVE_AUTORECONF" = "xno" ] ; then + $ECHO "Warning: libtoolize does not appear to be available." + else + $ECHO "Warning: libtoolize does not appear to be available. This means that" + $ECHO "the automatic build preparation via autoreconf will probably not work." + $ECHO "Preparing the build by running each step individually, however, should" + $ECHO "work and will be done automatically for you if autoreconf fails." + fi + + # look for some alternates + for tool in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do + $VERBOSE_ECHO "Checking libtoolize alternate: $tool --version" + _glibtoolize="`$tool --version > /dev/null 2>&1`" + if [ $? = 0 ] ; then + $VERBOSE_ECHO "Found $tool --version" + _glti="`which $tool`" + if [ "x$_glti" = "x" ] ; then + $VERBOSE_ECHO "Cannot find $tool with which" + continue; + fi + if test ! -f "$_glti" ; then + $VERBOSE_ECHO "Cannot use $tool, $_glti is not a file" + continue; + fi + _gltidir="`dirname $_glti`" + if [ "x$_gltidir" = "x" ] ; then + $VERBOSE_ECHO "Cannot find $tool path with dirname of $_glti" + continue; + fi + if test ! -d "$_gltidir" ; then + $VERBOSE_ECHO "Cannot use $tool, $_gltidir is not a directory" + continue; + fi + HAVE_ALT_LIBTOOLIZE=yes + LIBTOOLIZE="$tool" + $ECHO + $ECHO "Fortunately, $tool was found which means that your system may simply" + $ECHO "have a non-standard or incomplete GNU Autotools install. If you have" + $ECHO "sufficient system access, it may be possible to quell this warning by" + $ECHO "running:" + $ECHO + sudo -V > /dev/null 2>&1 + if [ $? = 0 ] ; then + $ECHO " sudo ln -s $_glti $_gltidir/libtoolize" + $ECHO + else + $ECHO " ln -s $_glti $_gltidir/libtoolize" + $ECHO + $ECHO "Run that as root or with proper permissions to the $_gltidir directory" + $ECHO + fi + _ltfound=yes + break + fi + done + else + _ltfound=yes + fi +else + _ltfound=yes + $ECHO "Using LIBTOOLIZE environment variable override: $LIBTOOLIZE" +fi + + +############################ +# libtoolize version check # +############################ +_report_error=no +if [ ! "x$_ltfound" = "xyes" ] ; then + $ECHO + $ECHO "ERROR: Unable to locate GNU Libtool." + _report_error=yes +else + _version="`$LIBTOOLIZE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Libtool version $_version" + version_check "$LIBTOOL_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$LIBTOOL_VERSION" "GNU Libtool" + exit 1 +fi + + +##################### +# check for aclocal # +##################### +if [ "x$ACLOCAL" = "x" ] ; then + for ACLOCAL in aclocal ; do + $VERBOSE_ECHO "Checking aclocal version: $ACLOCAL --version" + $ACLOCAL --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + break + fi + done +else + $ECHO "Using ACLOCAL environment variable override: $ACLOCAL" +fi + + +######################## +# check for autoheader # +######################## +if [ "x$AUTOHEADER" = "x" ] ; then + for AUTOHEADER in autoheader ; do + $VERBOSE_ECHO "Checking autoheader version: $AUTOHEADER --version" + $AUTOHEADER --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + break + fi + done +else + $ECHO "Using AUTOHEADER environment variable override: $AUTOHEADER" +fi + + +######################### +# check if version only # +######################### +$VERBOSE_ECHO "Checking whether to only output version information" +if [ "x$VERSION_ONLY" = "xyes" ] ; then + $ECHO + ident + $ECHO "---" + $ECHO "Version requested. No preparation or configuration will be performed." + exit 0 +fi + + +################################# +# PROTECT_FROM_CLOBBER FUNCTION # +################################# +protect_from_clobber ( ) { + PFC_INIT=1 + + # protect COPYING & INSTALL from overwrite by automake. the + # automake force option will (inappropriately) ignore the existing + # contents of a COPYING and/or INSTALL files (depending on the + # version) instead of just forcing *missing* files like it does + # for AUTHORS, NEWS, and README. this is broken but extremely + # prevalent behavior, so we protect against it by keeping a backup + # of the file that can later be restored. + + for file in COPYING INSTALL ; do + if test -f ${file} ; then + if test -f ${file}.$$.protect_from_automake.backup ; then + $VERBOSE_ECHO "Already backed up ${file} in `pwd`" + else + $VERBOSE_ECHO "Backing up ${file} in `pwd`" + $VERBOSE_ECHO "cp -p ${file} ${file}.$$.protect_from_automake.backup" + cp -p ${file} ${file}.$$.protect_from_automake.backup + fi + fi + done +} + + +############################## +# RECURSIVE_PROTECT FUNCTION # +############################## +recursive_protect ( ) { + + # for projects using recursive configure, run the build + # preparation steps for the subdirectories. this function assumes + # START_PATH was set to pwd before recursion begins so that + # relative paths work. + + # git 'r done, protect COPYING and INSTALL from being clobbered + protect_from_clobber + + if test -d autom4te.cache ; then + $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + fi + + # find configure template + _configure="`locate_configure_template`" + if [ "x$_configure" = "x" ] ; then + return + fi + # $VERBOSE_ECHO "Looking for configure template found `pwd`/$_configure" + + # look for subdirs + # $VERBOSE_ECHO "Looking for subdirs in `pwd`" + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + CHECK_DIRS="" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" + fi + done + + # process subdirs + if [ ! "x$CHECK_DIRS" = "x" ] ; then + $VERBOSE_ECHO "Recursively scanning the following directories:" + $VERBOSE_ECHO " $CHECK_DIRS" + for dir in $CHECK_DIRS ; do + $VERBOSE_ECHO "Protecting files from automake in $dir" + cd "$START_PATH" + eval "cd $dir" + + # recursively git 'r done + recursive_protect + done + fi +} # end of recursive_protect + + +############################# +# RESTORE_CLOBBERED FUNCION # +############################# +restore_clobbered ( ) { + + # The automake (and autoreconf by extension) -f/--force-missing + # option may overwrite COPYING and INSTALL even if they do exist. + # Here we restore the files if necessary. + + spacer=no + + for file in COPYING INSTALL ; do + if test -f ${file}.$$.protect_from_automake.backup ; then + if test -f ${file} ; then + # compare entire content, restore if needed + if test "x`cat ${file}`" != "x`cat ${file}.$$.protect_from_automake.backup`" ; then + if test "x$spacer" = "xno" ; then + $VERBOSE_ECHO + spacer=yes + fi + # restore the backup + $VERBOSE_ECHO "Restoring ${file} from backup (automake -f likely clobbered it)" + $VERBOSE_ECHO "rm -f ${file}" + rm -f ${file} + $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}" + mv ${file}.$$.protect_from_automake.backup ${file} + fi # check contents + elif test -f ${file}.$$.protect_from_automake.backup ; then + $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}" + mv ${file}.$$.protect_from_automake.backup ${file} + fi # -f ${file} + + # just in case + $VERBOSE_ECHO "rm -f ${file}.$$.protect_from_automake.backup" + rm -f ${file}.$$.protect_from_automake.backup + fi # -f ${file}.$$.protect_from_automake.backup + done + + CONFIGURE="`locate_configure_template`" + if [ "x$CONFIGURE" = "x" ] ; then + return + fi + + _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if test ! -d "$_aux_dir" ; then + _aux_dir=. + fi + + for file in config.guess config.sub ltmain.sh ; do + if test -f "${_aux_dir}/${file}" ; then + $VERBOSE_ECHO "rm -f \"${_aux_dir}/${file}.backup\"" + rm -f "${_aux_dir}/${file}.backup" + fi + done +} # end of restore_clobbered + + +############################## +# RECURSIVE_RESTORE FUNCTION # +############################## +recursive_restore ( ) { + + # restore COPYING and INSTALL from backup if they were clobbered + # for each directory recursively. + + # git 'r undone + restore_clobbered + + # find configure template + _configure="`locate_configure_template`" + if [ "x$_configure" = "x" ] ; then + return + fi + + # look for subdirs + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + CHECK_DIRS="" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" + fi + done + + # process subdirs + if [ ! "x$CHECK_DIRS" = "x" ] ; then + $VERBOSE_ECHO "Recursively scanning the following directories:" + $VERBOSE_ECHO " $CHECK_DIRS" + for dir in $CHECK_DIRS ; do + $VERBOSE_ECHO "Checking files for automake damage in $dir" + cd "$START_PATH" + eval "cd $dir" + + # recursively git 'r undone + recursive_restore + done + fi +} # end of recursive_restore + + +####################### +# INITIALIZE FUNCTION # +####################### +initialize ( ) { + + # this routine performs a variety of directory-specific + # initializations. some are sanity checks, some are preventive, + # and some are necessary setup detection. + # + # this function sets: + # CONFIGURE + # SEARCH_DIRS + # CONFIG_SUBDIRS + + ################################## + # check for a configure template # + ################################## + CONFIGURE="`locate_configure_template`" + if [ "x$CONFIGURE" = "x" ] ; then + $ECHO + $ECHO "A configure.ac or configure.in file could not be located implying" + $ECHO "that the GNU Build System is at least not used in this directory. In" + $ECHO "any case, there is nothing to do here without one of those files." + $ECHO + $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" + exit 1 + fi + + ##################### + # detect an aux dir # + ##################### + _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if test ! -d "$_aux_dir" ; then + _aux_dir=. + else + $VERBOSE_ECHO "Detected auxillary directory: $_aux_dir" + fi + + ################################ + # detect a recursive configure # + ################################ + CONFIG_SUBDIRS="" + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $CONFIGURE | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + $VERBOSE_ECHO "Detected recursive configure directory: `pwd`/$dir" + CONFIG_SUBDIRS="$CONFIG_SUBDIRS `pwd`/$dir" + fi + done + + ########################################################### + # make sure certain required files exist for GNU projects # + ########################################################### + _marker_found="" + _marker_found_message_intro='Detected non-GNU marker "' + _marker_found_message_mid='" in ' + for marker in foreign cygnus ; do + _marker_found_message=${_marker_found_message_intro}${marker}${_marker_found_message_mid} + _marker_found="`grep 'AM_INIT_AUTOMAKE.*'${marker} $CONFIGURE`" + if [ ! "x$_marker_found" = "x" ] ; then + $VERBOSE_ECHO "${_marker_found_message}`basename \"$CONFIGURE\"`" + break + fi + if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then + _marker_found="`grep 'AUTOMAKE_OPTIONS.*'${marker} Makefile.am`" + if [ ! "x$_marker_found" = "x" ] ; then + $VERBOSE_ECHO "${_marker_found_message}Makefile.am" + break + fi + fi + done + if [ "x${_marker_found}" = "x" ] ; then + _suggest_foreign=no + for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do + if [ ! -f $file ] ; then + $VERBOSE_ECHO "Touching ${file} since it does not exist" + _suggest_foreign=yes + touch $file + fi + done + + if [ "x${_suggest_foreign}" = "xyes" ] ; then + $ECHO + $ECHO "Warning: Several files expected of projects that conform to the GNU" + $ECHO "coding standards were not found. The files were automatically added" + $ECHO "for you since you do not have a 'foreign' declaration specified." + $ECHO + $ECHO "Considered adding 'foreign' to AM_INIT_AUTOMAKE in `basename \"$CONFIGURE\"`" + if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then + $ECHO "or to AUTOMAKE_OPTIONS in your top-level Makefile.am file." + fi + $ECHO + fi + fi + + ################################################## + # make sure certain generated files do not exist # + ################################################## + for file in config.guess config.sub ltmain.sh ; do + if test -f "${_aux_dir}/${file}" ; then + $VERBOSE_ECHO "mv -f \"${_aux_dir}/${file}\" \"${_aux_dir}/${file}.backup\"" + mv -f "${_aux_dir}/${file}" "${_aux_dir}/${file}.backup" + fi + done + + ############################ + # search alternate m4 dirs # + ############################ + SEARCH_DIRS="" + for dir in m4 ; do + if [ -d $dir ] ; then + $VERBOSE_ECHO "Found extra aclocal search directory: $dir" + SEARCH_DIRS="$SEARCH_DIRS -I $dir" + fi + done + + ###################################### + # remove any previous build products # + ###################################### + if test -d autom4te.cache ; then + $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + fi +# tcl/tk (and probably others) have a customized aclocal.m4, so can't delete it +# if test -f aclocal.m4 ; then +# $VERBOSE_ECHO "Found an aclocal.m4 file, deleting it" +# $VERBOSE_ECHO "rm -f aclocal.m4" +# rm -f aclocal.m4 +# fi + +} # end of initialize() + + +############## +# initialize # +############## + +# stash path +START_PATH="`pwd`" + +# Before running autoreconf or manual steps, some prep detection work +# is necessary or useful. Only needs to occur once per directory, but +# does need to traverse the entire subconfigure hierarchy to protect +# files from being clobbered even by autoreconf. +recursive_protect + +# start from where we started +cd "$START_PATH" + +# get ready to process +initialize + + +######################################### +# DOWNLOAD_GNULIB_CONFIG_GUESS FUNCTION # +######################################### + +# TODO - should make sure wget/curl exist and/or work before trying to +# use them. + +download_gnulib_config_guess () { + # abuse gitweb to download gnulib's latest config.guess via HTTP + config_guess_temp="config.guess.$$.download" + ret=1 + for __cmd in wget curl fetch ; do + $VERBOSE_ECHO "Checking for command ${__cmd}" + ${__cmd} --version > /dev/null 2>&1 + ret=$? + if [ ! $ret = 0 ] ; then + continue + fi + + __cmd_version=`${__cmd} --version | head -n 1 | sed -e 's/^[^0-9]\+//' -e 's/ .*//'` + $VERBOSE_ECHO "Found ${__cmd} ${__cmd_version}" + + opts="" + case ${__cmd} in + wget) + opts="-O" + ;; + curl) + opts="-o" + ;; + fetch) + opts="-t 5 -f" + ;; + esac + + $VERBOSE_ECHO "Running $__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" + eval "$__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" > /dev/null 2>&1 + if [ $? = 0 ] ; then + mv -f "${config_guess_temp}" ${_aux_dir}/config.guess + ret=0 + break + fi + done + + if [ ! $ret = 0 ] ; then + $ECHO "Warning: config.guess download failed from: $CONFIG_GUESS_URL" + rm -f "${config_guess_temp}" + fi +} + + +############################## +# LIBTOOLIZE_NEEDED FUNCTION # +############################## +libtoolize_needed () { + ret=1 # means no, don't need libtoolize + for feature in AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + ret=0 # means yes, need to run libtoolize + break + fi + done + return ${ret} +} + + + +############################################ +# prepare build via autoreconf or manually # +############################################ +reconfigure_manually=no +if [ "x$HAVE_AUTORECONF" = "xyes" ] ; then + $ECHO + $ECHO $ECHO_N "Automatically preparing build ... $ECHO_C" + + $VERBOSE_ECHO "$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS" + autoreconf_output="`$AUTORECONF $SEARCH_DIRS $AUTORECONF_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoreconf_output" + + if [ ! $ret = 0 ] ; then + if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then + if [ ! "x`echo \"$autoreconf_output\" | grep libtoolize | grep \"No such file or directory\"`" = "x" ] ; then + $ECHO + $ECHO "Warning: autoreconf failed but due to what is usually a common libtool" + $ECHO "misconfiguration issue. This problem is encountered on systems that" + $ECHO "have installed libtoolize under a different name without providing a" + $ECHO "symbolic link or without setting the LIBTOOLIZE environment variable." + $ECHO + $ECHO "Restarting the preparation steps with LIBTOOLIZE set to $LIBTOOLIZE" + + export LIBTOOLIZE + RUN_RECURSIVE=no + export RUN_RECURSIVE + untrap_abnormal + + $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + exit $? + fi + fi + + $ECHO "Warning: $AUTORECONF failed" + + if test -f ltmain.sh ; then + $ECHO "libtoolize being run by autoreconf is not creating ltmain.sh in the auxillary directory like it should" + fi + + $ECHO "Attempting to run the preparation steps individually" + reconfigure_manually=yes + else + if [ "x$DOWNLOAD" = "xyes" ] ; then + if libtoolize_needed ; then + download_gnulib_config_guess + fi + fi + fi +else + reconfigure_manually=yes +fi + + +############################ +# LIBTOOL_FAILURE FUNCTION # +############################ +libtool_failure ( ) { + + # libtool is rather error-prone in comparison to the other + # autotools and this routine attempts to compensate for some + # common failures. the output after a libtoolize failure is + # parsed for an error related to AC_PROG_LIBTOOL and if found, we + # attempt to inject a project-provided libtool.m4 file. + + _autoconf_output="$1" + + if [ "x$RUN_RECURSIVE" = "xno" ] ; then + # we already tried the libtool.m4, don't try again + return 1 + fi + + if test -f "$LIBTOOL_M4" ; then + found_libtool="`$ECHO $_autoconf_output | grep AC_PROG_LIBTOOL`" + if test ! "x$found_libtool" = "x" ; then + if test -f acinclude.m4 ; then + rm -f acinclude.m4.$$.backup + $VERBOSE_ECHO "cat acinclude.m4 > acinclude.m4.$$.backup" + cat acinclude.m4 > acinclude.m4.$$.backup + fi + $VERBOSE_ECHO "cat \"$LIBTOOL_M4\" >> acinclude.m4" + chmod u+w acinclude.m4 + cat "$LIBTOOL_M4" >> acinclude.m4 + + # don't keep doing this + RUN_RECURSIVE=no + export RUN_RECURSIVE + untrap_abnormal + + $ECHO + $ECHO "Restarting the preparation steps with libtool macros in acinclude.m4" + $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + exit $? + fi + fi +} + + +########################### +# MANUAL_AUTOGEN FUNCTION # +########################### +manual_autogen ( ) { + + ################################################## + # Manual preparation steps taken are as follows: # + # aclocal [-I m4] # + # libtoolize --automake -c -f # + # aclocal [-I m4] # + # autoconf -f # + # autoheader # + # automake -a -c -f # + ################################################## + + ########### + # aclocal # + ########### + $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" + aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$aclocal_output" + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $ACLOCAL failed" && exit 2 ; fi + + ############## + # libtoolize # + ############## + if libtoolize_needed ; then + if [ "x$HAVE_LIBTOOLIZE" = "xyes" ] ; then + $VERBOSE_ECHO "$LIBTOOLIZE $LIBTOOLIZE_OPTIONS" + libtoolize_output="`$LIBTOOLIZE $LIBTOOLIZE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$libtoolize_output" + + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi + else + if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then + $VERBOSE_ECHO "$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS" + libtoolize_output="`$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$libtoolize_output" + + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi + fi + fi + + ########### + # aclocal # + ########### + # re-run again as instructed by libtoolize + $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" + aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$aclocal_output" + + # libtoolize might put ltmain.sh in the wrong place + if test -f ltmain.sh ; then + if test ! -f "${_aux_dir}/ltmain.sh" ; then + $ECHO + $ECHO "Warning: $LIBTOOLIZE is creating ltmain.sh in the wrong directory" + $ECHO + $ECHO "Fortunately, the problem can be worked around by simply copying the" + $ECHO "file to the appropriate location (${_aux_dir}/). This has been done for you." + $ECHO + $VERBOSE_ECHO "cp -p ltmain.sh \"${_aux_dir}/ltmain.sh\"" + cp -p ltmain.sh "${_aux_dir}/ltmain.sh" + $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C" + fi + fi # ltmain.sh + + if [ "x$DOWNLOAD" = "xyes" ] ; then + download_gnulib_config_guess + fi + fi # libtoolize_needed + + ############ + # autoconf # + ############ + $VERBOSE_ECHO + $VERBOSE_ECHO "$AUTOCONF $AUTOCONF_OPTIONS" + autoconf_output="`$AUTOCONF $AUTOCONF_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoconf_output" + + if [ ! $ret = 0 ] ; then + # retry without the -f and check for usage of macros that are too new + ac2_59_macros="AC_C_RESTRICT AC_INCLUDES_DEFAULT AC_LANG_ASSERT AC_LANG_WERROR AS_SET_CATFILE" + ac2_55_macros="AC_COMPILER_IFELSE AC_FUNC_MBRTOWC AC_HEADER_STDBOOL AC_LANG_CONFTEST AC_LANG_SOURCE AC_LANG_PROGRAM AC_LANG_CALL AC_LANG_FUNC_TRY_LINK AC_MSG_FAILURE AC_PREPROC_IFELSE" + ac2_54_macros="AC_C_BACKSLASH_A AC_CONFIG_LIBOBJ_DIR AC_GNU_SOURCE AC_PROG_EGREP AC_PROG_FGREP AC_REPLACE_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_REALLOC AC_TYPE_MBSTATE_T" + + macros_to_search="" + ac_major="`echo ${AUTOCONF_VERSION}. | cut -d. -f1 | sed 's/[^0-9]//g'`" + ac_minor="`echo ${AUTOCONF_VERSION}. | cut -d. -f2 | sed 's/[^0-9]//g'`" + + if [ $ac_major -lt 2 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" + else + if [ $ac_minor -lt 54 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" + elif [ $ac_minor -lt 55 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros" + elif [ $ac_minor -lt 59 ] ; then + macros_to_search="$ac2_59_macros" + fi + fi + + configure_ac_macros=__none__ + for feature in $macros_to_search ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + if [ "x$configure_ac_macros" = "x__none__" ] ; then + configure_ac_macros="$feature" + else + configure_ac_macros="$feature $configure_ac_macros" + fi + fi + done + if [ ! "x$configure_ac_macros" = "x__none__" ] ; then + $ECHO + $ECHO "Warning: Unsupported macros were found in $CONFIGURE" + $ECHO + $ECHO "The `basename \"$CONFIGURE\"` file was scanned in order to determine if any" + $ECHO "unsupported macros are used that exceed the minimum version" + $ECHO "settings specified within this file. As such, the following macros" + $ECHO "should be removed from configure.ac or the version numbers in this" + $ECHO "file should be increased:" + $ECHO + $ECHO "$configure_ac_macros" + $ECHO + $ECHO $ECHO_N "Ignorantly continuing build preparation ... $ECHO_C" + fi + + ################### + # autoconf, retry # + ################### + $VERBOSE_ECHO + $VERBOSE_ECHO "$AUTOCONF" + autoconf_output="`$AUTOCONF 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoconf_output" + + if [ ! $ret = 0 ] ; then + # test if libtool is busted + libtool_failure "$autoconf_output" + + # let the user know what went wrong + cat <<EOF +$autoconf_output +EOF + $ECHO "ERROR: $AUTOCONF failed" + exit 2 + else + # autoconf sans -f and possibly sans unsupported options succeed so warn verbosely + $ECHO + $ECHO "Warning: autoconf seems to have succeeded by removing the following options:" + $ECHO " AUTOCONF_OPTIONS=\"$AUTOCONF_OPTIONS\"" + $ECHO + $ECHO "Removing those options should not be necessary and indicate some other" + $ECHO "problem with the build system. The build preparation is highly suspect" + $ECHO "and may result in configuration or compilation errors. Consider" + if [ "x$VERBOSE_ECHO" = "x:" ] ; then + $ECHO "rerunning the build preparation with verbose output enabled." + $ECHO " $AUTOGEN_SH --verbose" + else + $ECHO "reviewing the minimum GNU Autotools version settings contained in" + $ECHO "this script along with the macros being used in your `basename \"$CONFIGURE\"` file." + fi + $ECHO + $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C" + fi # autoconf ret = 0 + fi # autoconf ret = 0 + + ############## + # autoheader # + ############## + need_autoheader=no + for feature in AM_CONFIG_HEADER AC_CONFIG_HEADER ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + need_autoheader=yes + break + fi + done + if [ "x$need_autoheader" = "xyes" ] ; then + $VERBOSE_ECHO "$AUTOHEADER $AUTOHEADER_OPTIONS" + autoheader_output="`$AUTOHEADER $AUTOHEADER_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoheader_output" + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $AUTOHEADER failed" && exit 2 ; fi + fi # need_autoheader + + ############ + # automake # + ############ + need_automake=no + for feature in AM_INIT_AUTOMAKE ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + need_automake=yes + break + fi + done + + if [ "x$need_automake" = "xyes" ] ; then + $VERBOSE_ECHO "$AUTOMAKE $AUTOMAKE_OPTIONS" + automake_output="`$AUTOMAKE $AUTOMAKE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$automake_output" + + if [ ! $ret = 0 ] ; then + + ################### + # automake, retry # + ################### + $VERBOSE_ECHO + $VERBOSE_ECHO "$AUTOMAKE $ALT_AUTOMAKE_OPTIONS" + # retry without the -f + automake_output="`$AUTOMAKE $ALT_AUTOMAKE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$automake_output" + + if [ ! $ret = 0 ] ; then + # test if libtool is busted + libtool_failure "$automake_output" + + # let the user know what went wrong + cat <<EOF +$automake_output +EOF + $ECHO "ERROR: $AUTOMAKE failed" + exit 2 + fi # automake retry + fi # automake ret = 0 + fi # need_automake +} # end of manual_autogen + + +##################################### +# RECURSIVE_MANUAL_AUTOGEN FUNCTION # +##################################### +recursive_manual_autogen ( ) { + + # run the build preparation steps manually for this directory + manual_autogen + + # for projects using recursive configure, run the build + # preparation steps for the subdirectories. + if [ ! "x$CONFIG_SUBDIRS" = "x" ] ; then + $VERBOSE_ECHO "Recursively configuring the following directories:" + $VERBOSE_ECHO " $CONFIG_SUBDIRS" + for dir in $CONFIG_SUBDIRS ; do + $VERBOSE_ECHO "Processing recursive configure in $dir" + cd "$START_PATH" + cd "$dir" + + # new directory, prepare + initialize + + # run manual steps for the subdir and any others below + recursive_manual_autogen + done + fi +} + + +################################ +# run manual preparation steps # +################################ +if [ "x$reconfigure_manually" = "xyes" ] ; then + $ECHO + $ECHO $ECHO_N "Preparing build ... $ECHO_C" + + recursive_manual_autogen +fi + + +######################### +# restore and summarize # +######################### +cd "$START_PATH" + +# restore COPYING and INSTALL from backup if necessary +recursive_restore + +# make sure we end up with a configure script +config_ac="`locate_configure_template`" +config="`echo $config_ac | sed 's/\.ac$//' | sed 's/\.in$//'`" +if [ "x$config" = "x" ] ; then + $VERBOSE_ECHO "Could not locate the configure template (from `pwd`)" +fi + +# summarize +$ECHO "done" +$ECHO +if test "x$config" = "x" -o ! -f "$config" ; then + $ECHO "WARNING: The $PROJECT build system should now be prepared but there" + $ECHO "does not seem to be a resulting configure file. This is unexpected" + $ECHO "and likely the result of an error. You should run $NAME_OF_AUTOGEN" + $ECHO "with the --verbose option to get more details on a potential" + $ECHO "misconfiguration." +else + $ECHO "The $PROJECT build system is now prepared. To build here, run:" + $ECHO " $config" + $ECHO " make" +fi + + +# Local Variables: +# mode: sh +# tab-width: 8 +# sh-basic-offset: 4 +# sh-indentation: 4 +# indent-tabs-mode: t +# End: +# ex: shiftwidth=4 tabstop=8 diff --git a/assdraw/configure.in b/assdraw/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..6c2eb07a3944a184802d2fb36c5378022146474b --- /dev/null +++ b/assdraw/configure.in @@ -0,0 +1,74 @@ +AC_PREREQ(2.61) + +####### +# Setup +####### +AC_INIT([assdraw], [1.0.0]) +AC_CONFIG_SRCDIR([src/engine.cpp]) +AC_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE([foreign]) +AC_CANONICAL_HOST +AC_CONFIG_MACRO_DIR([m4]) + +#################### +# Check for programs +#################### +AC_PROG_CC +AC_PROG_CXX +AC_LANG(C++) +AC_PROG_LIBTOOL +AC_PROG_INSTALL +PKG_PROG_PKG_CONFIG([0.20]) + +################# +# Developers only +################# +AM_MAINTAINER_MODE + +AC_ARG_VAR([DEBUG_FLAGS], [Debug flag to use with --enable debug (default: -g)]) +if test -z "$DEBUG_FLAGS"; then + DEBUG_FLAGS="-g"; +fi + +AC_MSG_CHECKING([whether to turn on debugging]) +AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (default=no)]) +if test "$enable_debug" = "yes"; then + AC_MSG_RESULT([yes ($DEBUG_FLAGS)]) + CPPFLAGS="$DEBUG_FLAGS $CPPFLAGS" +else + AC_MSG_RESULT([no]) +fi + +AC_ARG_ENABLE(build-dist) +if test "$enable_build_dist" = "yes"; then + SVN_VERSION=`svnversion .` + PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_VERSION" + PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_VERSION" + VERSION="${VERSION}-r$SVN_VERSION" +fi + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. +AM_OPTIONS_WXCONFIG +AM_PATH_WXCONFIG(2.8.1, [have_wxconfig=1], [have_wxconfig=0], [std,gl,stc,aui, propgrid]) + +if test "$have_wxconfig" != 1; then + AC_MSG_FAILURE([ +wxWidgets detection failed, please set --with-wx* or add +the libraries to your LDFLAGS, CXX/CFLAGS. + ]) +fi + +PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, [with_libagg=yes], [with_libagg=no]) + +if test "$with_libagg" != "yes"; then + AC_MSG_FAILURE([You must have AGG installed: http://vector-agg.sourceforge.net/]) +fi + +AC_OUTPUT([ +Makefile +src/wxAGG/Makefile +src/xpm/Makefile +src/Makefile +]) diff --git a/assdraw/m4/wxwin.m4 b/assdraw/m4/wxwin.m4 new file mode 100644 index 0000000000000000000000000000000000000000..1c50dcc27254556f9f4f83edc31afa25684361a8 --- /dev/null +++ b/assdraw/m4/wxwin.m4 @@ -0,0 +1,1060 @@ +dnl --------------------------------------------------------------------------- +dnl Author: wxWidgets development team, +dnl Francesco Montorsi, +dnl Bob McCown (Mac-testing) +dnl Creation date: 24/11/2001 +dnl RCS-ID: $Id$ +dnl --------------------------------------------------------------------------- + +dnl =========================================================================== +dnl Table of Contents of this macro file: +dnl ------------------------------------- +dnl +dnl SECTION A: wxWidgets main macros +dnl - WX_CONFIG_OPTIONS +dnl - WX_CONFIG_CHECK +dnl - WXRC_CHECK +dnl - WX_STANDARD_OPTIONS +dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl - WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl SECTION B: wxWidgets-related utilities +dnl - WX_LIKE_LIBNAME +dnl - WX_ARG_ENABLE_YESNOAUTO +dnl - WX_ARG_WITH_YESNOAUTO +dnl +dnl SECTION C: messages to the user +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl - WX_BOOLOPT_SUMMARY +dnl +dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra +dnl debug output on stdout from these macros. +dnl =========================================================================== + + +dnl --------------------------------------------------------------------------- +dnl Macros for wxWidgets detection. Typically used in configure.in as: +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl WX_CONFIG_OPTIONS +dnl ... +dnl ... +dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.3.4 or above. +dnl ]) +dnl fi +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LIBS="$LIBS $WX_LIBS" +dnl +dnl If you want to support standard --enable-debug/unicode/shared options, you +dnl may do the following: +dnl +dnl ... +dnl AC_CANONICAL_SYSTEM +dnl +dnl # define configure options +dnl WX_CONFIG_OPTIONS +dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) +dnl +dnl # basic configure checks +dnl ... +dnl +dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE +dnl WX_DEBUG=$DEBUG +dnl WX_UNICODE=$UNICODE +dnl +dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) +dnl WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl # write the output files +dnl AC_CONFIG_FILES([Makefile ...]) +dnl AC_OUTPUT +dnl +dnl # optional: just to show a message to the user +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl +dnl --------------------------------------------------------------------------- + + +dnl --------------------------------------------------------------------------- +dnl WX_CONFIG_OPTIONS +dnl +dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and +dnl --wx-config command line options +dnl --------------------------------------------------------------------------- + +AC_DEFUN([WX_CONFIG_OPTIONS], +[ + AC_ARG_WITH(wxdir, + [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], + [ wx_config_name="$withval/wx-config" + wx_config_args="--inplace"]) + AC_ARG_WITH(wx-config, + [ --with-wx-config=CONFIG wx-config script to use (optional)], + wx_config_name="$withval" ) + AC_ARG_WITH(wx-prefix, + [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], + wx_config_prefix="$withval", wx_config_prefix="") + AC_ARG_WITH(wx-exec-prefix, + [ --with-wx-exec-prefix=PREFIX + Exec prefix where wxWidgets is installed (optional)], + wx_config_exec_prefix="$withval", wx_config_exec_prefix="") +]) + +dnl Helper macro for checking if wx version is at least $1.$2.$3, set's +dnl wx_ver_ok=yes if it is: +AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], +[ + wx_ver_ok="" + if test "x$WX_VERSION" != x ; then + if test $wx_config_major_version -gt $1; then + wx_ver_ok=yes + else + if test $wx_config_major_version -eq $1; then + if test $wx_config_minor_version -gt $2; then + wx_ver_ok=yes + else + if test $wx_config_minor_version -eq $2; then + if test $wx_config_micro_version -ge $3; then + wx_ver_ok=yes + fi + fi + fi + fi + fi + fi +]) + +dnl --------------------------------------------------------------------------- +dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) +dnl +dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC +dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME +dnl environment variable to override the default name of the wx-config script +dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this +dnl case the macro won't even waste time on tests for its existence. +dnl +dnl Optional WX-LIBS argument contains comma- or space-separated list of +dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS +dnl and WX_LIBS_STATIC will contain flags to link with all of the core +dnl wxWidgets libraries. +dnl +dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config +dnl invocation command in present. It can be used to fine-tune lookup of +dnl best wxWidgets build available. +dnl +dnl Example use: +dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] +dnl [--unicode --debug]) +dnl --------------------------------------------------------------------------- + +dnl +dnl Get the cflags and libraries from the wx-config script +dnl +AC_DEFUN([WX_CONFIG_CHECK], +[ + dnl do we have wx-config name: it can be wx-config or wxd-config or ... + if test x${WX_CONFIG_NAME+set} != xset ; then + WX_CONFIG_NAME=wx-config + fi + + if test "x$wx_config_name" != x ; then + WX_CONFIG_NAME="$wx_config_name" + fi + + dnl deal with optional prefixes + if test x$wx_config_exec_prefix != x ; then + wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" + WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" + fi + if test x$wx_config_prefix != x ; then + wx_config_args="$wx_config_args --prefix=$wx_config_prefix" + WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" + fi + if test "$cross_compiling" = "yes"; then + wx_config_args="$wx_config_args --host=$host_alias" + fi + + dnl don't search the PATH if WX_CONFIG_NAME is absolute filename + if test -x "$WX_CONFIG_NAME" ; then + AC_MSG_CHECKING(for wx-config) + WX_CONFIG_PATH="$WX_CONFIG_NAME" + AC_MSG_RESULT($WX_CONFIG_PATH) + else + AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") + fi + + if test "$WX_CONFIG_PATH" != "no" ; then + WX_VERSION="" + + min_wx_version=ifelse([$1], ,2.2.1,$1) + if test -z "$5" ; then + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) + else + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) + fi + + dnl don't add the libraries ($4) to this variable as this would result in + dnl an error when it's used with --version below + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" + + WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` + wx_config_major_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_config_minor_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_config_micro_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + wx_requested_major_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_requested_minor_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_requested_micro_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], + [$wx_requested_minor_version], + [$wx_requested_micro_version]) + + if test -n "$wx_ver_ok"; then + AC_MSG_RESULT(yes (version $WX_VERSION)) + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` + + dnl is this even still appropriate? --static is a real option now + dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is + dnl what the user actually wants, making this redundant at best. + dnl For now keep it in case anyone actually used it in the past. + AC_MSG_CHECKING([for wxWidgets static library]) + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` + if test "x$WX_LIBS_STATIC" = "x"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + + dnl starting with version 2.2.6 wx-config has --cppflags argument + wx_has_cppflags="" + if test $wx_config_major_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_minor_version -eq 2; then + if test $wx_config_micro_version -ge 6; then + wx_has_cppflags=yes + fi + fi + fi + fi + fi + + dnl starting with version 2.7.0 wx-config has --rescomp option + wx_has_rescomp="" + if test $wx_config_major_version -gt 2; then + wx_has_rescomp=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -ge 7; then + wx_has_rescomp=yes + fi + fi + fi + if test "x$wx_has_rescomp" = x ; then + dnl cannot give any useful info for resource compiler + WX_RESCOMP= + else + WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` + fi + + if test "x$wx_has_cppflags" = x ; then + dnl no choice but to define all flags like CFLAGS + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` + WX_CPPFLAGS=$WX_CFLAGS + WX_CXXFLAGS=$WX_CFLAGS + + WX_CFLAGS_ONLY=$WX_CFLAGS + WX_CXXFLAGS_ONLY=$WX_CFLAGS + else + dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` + + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi + + ifelse([$2], , :, [$2]) + + else + + if test "x$WX_VERSION" = x; then + dnl no wx-config at all + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) + fi + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + if test ! -z "$5"; then + + wx_error_message=" + The configuration you asked for $PACKAGE_NAME requires a wxWidgets + build with the following settings: + $5 + but such build is not available. + + To see the wxWidgets builds available on this system, please use + 'wx-config --list' command. To use the default build, returned by + 'wx-config --selected-config', use the options with their 'auto' + default values." + + fi + + wx_error_message=" + The requested wxWidgets build couldn't be found. + $wx_error_message + + If you still get this error, then check that 'wx-config' is + in path, the directory where wxWidgets libraries are installed + (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH + or equivalent variable and wxWidgets version is $1 or above." + + ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) + + fi + else + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + ifelse([$3], , :, [$3]) + + fi + + AC_SUBST(WX_CPPFLAGS) + AC_SUBST(WX_CFLAGS) + AC_SUBST(WX_CXXFLAGS) + AC_SUBST(WX_CFLAGS_ONLY) + AC_SUBST(WX_CXXFLAGS_ONLY) + AC_SUBST(WX_LIBS) + AC_SUBST(WX_LIBS_STATIC) + AC_SUBST(WX_VERSION) + AC_SUBST(WX_RESCOMP) + + dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols + dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): + WX_VERSION_MAJOR="$wx_config_major_version" + WX_VERSION_MINOR="$wx_config_minor_version" + WX_VERSION_MICRO="$wx_config_micro_version" + AC_SUBST(WX_VERSION_MAJOR) + AC_SUBST(WX_VERSION_MINOR) + AC_SUBST(WX_VERSION_MICRO) +]) + +dnl --------------------------------------------------------------------------- +dnl Get information on the wxrc program for making C++, Python and xrs +dnl resource files. +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl WX_CONFIG_OPTIONS +dnl ... +dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.6.0 or above. +dnl ]) +dnl fi +dnl +dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) +dnl if test "x$HAVE_WXRC" != x1; then +dnl AC_MSG_ERROR([ +dnl The wxrc program was not installed or not found. +dnl +dnl Please check the wxWidgets installation. +dnl ]) +dnl fi +dnl +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LDFLAGS="$LDFLAGS $WX_LIBS" +dnl --------------------------------------------------------------------------- + +dnl --------------------------------------------------------------------------- +dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS +dnl resources. The variable WXRC will be set and substituted in the configure +dnl script and Makefiles. +dnl +dnl Example use: +dnl WXRC_CHECK([wxrc=1], [wxrc=0]) +dnl --------------------------------------------------------------------------- + +dnl +dnl wxrc program from the wx-config script +dnl +AC_DEFUN([WXRC_CHECK], +[ + AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) + + if test "x$WX_CONFIG_NAME" = x; then + AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) + else + + AC_MSG_CHECKING([for wxrc]) + + if test "x$WXRC" = x ; then + dnl wx-config --utility is a new addition to wxWidgets: + _WX_PRIVATE_CHECK_VERSION(2,5,3) + if test -n "$wx_ver_ok"; then + WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` + fi + fi + + if test "x$WXRC" = x ; then + AC_MSG_RESULT([not found]) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT([$WXRC]) + ifelse([$1], , :, [$1]) + fi + + AC_SUBST(WXRC) + fi +]) + +dnl --------------------------------------------------------------------------- +dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) +dnl +dnl Sets the "output-var" variable to the name of a library named with same +dnl wxWidgets rule. +dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets +dnl the $lib variable to: +dnl 'mine_gtk2ud_test-2.8' +dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_LIKE_LIBNAME], + [ + wx_temp="$2""_""$WX_PORT" + + dnl add the [u][d] string + if test "$WX_UNICODE" = "1"; then + wx_temp="$wx_temp""u" + fi + if test "$WX_DEBUG" = "1"; then + wx_temp="$wx_temp""d" + fi + + dnl complete the name of the lib + wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" + + dnl save it in the user's variable + $1=$wx_temp + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO +dnl +dnl Two little custom macros which define the ENABLE/WITH configure arguments. +dnl Macro arguments: +dnl $1 = the name of the --enable / --with feature +dnl $2 = the name of the variable associated +dnl $3 = the description of that feature +dnl $4 = the default value for that feature +dnl $5 = additional action to do in case option is given with "yes" value +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], + [AC_ARG_ENABLE($1, + AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), + [], [enableval="$4"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --enable-$1 option]) + if test "$enableval" = "yes" ; then + AC_MSG_RESULT([yes]) + $2=1 + $5 + elif test "$enableval" = "no" ; then + AC_MSG_RESULT([no]) + $2=0 + elif test "$enableval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + $2="auto" + else + AC_MSG_ERROR([ + Unrecognized option value (allowed values: yes, no, auto) + ]) + fi + ]) + +AC_DEFUN([WX_ARG_WITH_YESNOAUTO], + [AC_ARG_WITH($1, + AC_HELP_STRING([--with-$1], [$3 (default is $4)]), + [], [withval="$4"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-$1 option]) + if test "$withval" = "yes" ; then + AC_MSG_RESULT([yes]) + $2=1 + $5 + dnl NB: by default we don't allow --with-$1=no option + dnl since it does not make much sense ! + elif test "$6" = "1" -a "$withval" = "no" ; then + AC_MSG_RESULT([no]) + $2=0 + elif test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + $2="auto" + else + AC_MSG_ERROR([ + Unrecognized option value (allowed values: yes, auto) + ]) + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS([options-to-add]) +dnl +dnl Adds to the configure script one or more of the following options: +dnl --enable-[debug|unicode|shared|wxshared|wxdebug] +dnl --with-[gtk|msw|motif|x11|mac|dfb] +dnl --with-wxversion +dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, +dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. +dnl +dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the +dnl --enable-unicode option (in boolean format) while the second indicates +dnl if wxWidgets was built in Unicode mode (and still is in boolean format). +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS], + [ + + dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if + dnl the $1 argument contains respectively the debug,unicode or shared options. + + dnl be careful here not to set debug flag if only "wxdebug" was specified + ifelse(regexp([$1], [\bdebug]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) + + ifelse(index([$1], [unicode]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) + + ifelse(regexp([$1], [\bshared]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) + + dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option + dnl which must be able to accept the auto|gtk1|gtk2|msw|... values + ifelse(index([$1], [toolkit]), [-1],, + [ + AC_ARG_WITH([toolkit], + AC_HELP_STRING([--with-toolkit], + [Build against a specific wxWidgets toolkit (default is auto)]), + [], [withval="auto"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-toolkit option]) + if test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + TOOLKIT="auto" + else + TOOLKIT="$withval" + + dnl PORT must be one of the allowed values + if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ + "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ + "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ + "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then + AC_MSG_ERROR([ + Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) + ]) + fi + + AC_MSG_RESULT([$TOOLKIT]) + fi + ]) + + dnl ****** IMPORTANT ******* + dnl Unlike for the UNICODE setting, you can build your program in + dnl shared mode against a static build of wxWidgets. Thus we have the + dnl following option which allows these mixtures. E.g. + dnl + dnl ./configure --disable-shared --with-wxshared + dnl + dnl will build your library in static mode against the first available + dnl shared build of wxWidgets. + dnl + dnl Note that's not possible to do the viceversa: + dnl + dnl ./configure --enable-shared --without-wxshared + dnl + dnl Doing so you would try to build your library in shared mode against a static + dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! + dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES + dnl (where we know what 'auto' should be expanded to). + dnl + dnl If you try to build something in ANSI mode against a UNICODE build + dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, + dnl then at best you'll get ton of linking errors ! + dnl ************************ + + ifelse(index([$1], [wxshared]), [-1],, + [ + WX_ARG_WITH_YESNOAUTO( + [wxshared], [WX_SHARED], + [Force building against a shared build of wxWidgets, even if --disable-shared is given], + [auto], [], [1]) + ]) + + dnl Just like for SHARED and WX_SHARED it may happen that some adventurous + dnl peoples will want to mix a wxWidgets release build with a debug build of + dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. + ifelse(index([$1], [wxdebug]), [-1],, + [ + WX_ARG_WITH_YESNOAUTO( + [wxdebug], [WX_DEBUG], + [Force building against a debug build of wxWidgets, even if --disable-debug is given], + [auto], [], [1]) + ]) + + dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option + dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values + ifelse(index([$1], [wxversion]), [-1],, + [ + AC_ARG_WITH([wxversion], + AC_HELP_STRING([--with-wxversion], + [Build against a specific version of wxWidgets (default is auto)]), + [], [withval="auto"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-wxversion option]) + if test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + WX_RELEASE="auto" + else + + wx_requested_major_version=`echo $withval | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` + wx_requested_minor_version=`echo $withval | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` + + dnl both vars above must be exactly 1 digit + if test "${#wx_requested_major_version}" != "1" -o \ + "${#wx_requested_minor_version}" != "1" ; then + AC_MSG_ERROR([ + Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) + ]) + fi + + WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" + AC_MSG_RESULT([$WX_RELEASE]) + fi + ]) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" + echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" + echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" + echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" + echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl +dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values +dnl which are different from "auto". +dnl Thus this macro needs to be called only once all options have been set. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], + [ + if test "$WX_SHARED" = "1" ; then + WXCONFIG_FLAGS="--static=no " + elif test "$WX_SHARED" = "0" ; then + WXCONFIG_FLAGS="--static=yes " + fi + + if test "$WX_DEBUG" = "1" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " + elif test "$WX_DEBUG" = "0" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " + fi + + dnl The user should have set WX_UNICODE=UNICODE + if test "$WX_UNICODE" = "1" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " + elif test "$WX_UNICODE" = "0" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " + fi + + if test "$TOOLKIT" != "auto" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " + fi + + if test "$WX_RELEASE" != "auto" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " + fi + + dnl strip out the last space of the string + WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] +dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets +dnl additional CPP flags and put the result of the search in WX_$RESULTVAR +dnl also adding the "yes" or "no" message result to MSG. +dnl --------------------------------------------------------------------------- +AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], + [ + if test "$$1" = "auto" ; then + + dnl The user does not have particular preferences for this option; + dnl so we will detect the wxWidgets relative build setting and use it + AC_MSG_CHECKING([$3]) + + dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 + dnl string or to 0 otherwise. + dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it + dnl doesn't work; we use 'expr STRING : REGEXP' instead + WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") + + if test "$WX_$1" != "0"; then + WX_$1=1 + AC_MSG_RESULT([yes]) + ifelse([$4], , :, [$4]) + else + WX_$1=0 + AC_MSG_RESULT([no]) + ifelse([$5], , :, [$5]) + fi + else + + dnl Use the setting given by the user + WX_$1=$$1 + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl Detects the values of the following variables: +dnl 1) WX_RELEASE +dnl 2) WX_UNICODE +dnl 3) WX_DEBUG +dnl 4) WX_SHARED (and also WX_STATIC) +dnl 5) WX_PORT +dnl from the previously selected wxWidgets build; this macro in fact must be +dnl called *after* calling the WX_CONFIG_CHECK macro. +dnl +dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set +dnl by WX_CONFIG_CHECK macro +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], + [ + dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, + dnl while WX_RELEASE only the major.minor ones. + WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" + if test $WX_RELEASE -lt 26 ; then + + AC_MSG_ERROR([ + Cannot detect the wxWidgets configuration for the selected wxWidgets build + since its version is $WX_VERSION < 2.6.0; please install a newer + version of wxWidgets. + ]) + fi + + dnl The wx-config we are using understands the "--selected_config" + dnl option which returns an easy-parseable string ! + WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] Using wx-config --selected-config" + echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" + fi + + + dnl we could test directly for WX_SHARED with a line like: + dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], + dnl [if wxWidgets was built in SHARED mode]) + dnl but wx-config --selected-config DOES NOT outputs the 'shared' + dnl word when wx was built in shared mode; it rather outputs the + dnl 'static' word when built in static mode. + if test $WX_SHARED = "1"; then + STATIC=0 + elif test $WX_SHARED = "0"; then + STATIC=1 + elif test $WX_SHARED = "auto"; then + STATIC="auto" + fi + + dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables + _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], + [if wxWidgets was built with UNICODE enabled]) + _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], + [if wxWidgets was built in DEBUG mode]) + _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], + [if wxWidgets was built in STATIC mode]) + + dnl init WX_SHARED from WX_STATIC + if test "$WX_STATIC" != "0"; then + WX_SHARED=0 + else + WX_SHARED=1 + fi + + AC_SUBST(WX_UNICODE) + AC_SUBST(WX_DEBUG) + AC_SUBST(WX_SHARED) + + dnl detect the WX_PORT to use + if test "$TOOLKIT" = "auto" ; then + + dnl The user does not have particular preferences for this option; + dnl so we will detect the wxWidgets relative build setting and use it + AC_MSG_CHECKING([which wxWidgets toolkit was selected]) + + WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") + WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") + WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") + WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") + WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") + WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") + WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") + WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") + + WX_PORT="unknown" + if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi + if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi + if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi + if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi + if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi + if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi + if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi + if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi + + dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac + dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) + WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") + if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi + + dnl check at least one of the WX_*PORT has been set ! + + if test "$WX_PORT" = "unknown" ; then + AC_MSG_ERROR([ + Cannot detect the currently installed wxWidgets port ! + Please check your 'wx-config --cxxflags'... + ]) + fi + + AC_MSG_RESULT([$WX_PORT]) + else + + dnl Use the setting given by the user + if test -z "$TOOLKIT" ; then + WX_PORT=$TOOLKIT + else + dnl try with PORT + WX_PORT=$PORT + fi + fi + + AC_SUBST(WX_PORT) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] Values of all WX_* options after final detection:" + echo "[[dbg]] WX_DEBUG: $WX_DEBUG" + echo "[[dbg]] WX_UNICODE: $WX_UNICODE" + echo "[[dbg]] WX_SHARED: $WX_SHARED" + echo "[[dbg]] WX_RELEASE: $WX_RELEASE" + echo "[[dbg]] WX_PORT: $WX_PORT" + fi + + dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when + dnl the user gives the options: + dnl ./configure --enable-shared --without-wxshared + dnl or just do + dnl ./configure --enable-shared + dnl but there is only a static build of wxWidgets available. + if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then + AC_MSG_ERROR([ + Cannot build shared library against a static build of wxWidgets ! + This error happens because the wxWidgets build which was selected + has been detected as static while you asked to build $PACKAGE_NAME + as shared library and this is not possible. + Use the '--disable-shared' option to build $PACKAGE_NAME + as static library or '--with-wxshared' to use wxWidgets as shared library. + ]) + fi + + dnl now we can finally update the DEBUG,UNICODE,SHARED options + dnl to their final values if they were set to 'auto' + if test "$DEBUG" = "auto"; then + DEBUG=$WX_DEBUG + fi + if test "$UNICODE" = "auto"; then + UNICODE=$WX_UNICODE + fi + if test "$SHARED" = "auto"; then + SHARED=$WX_SHARED + fi + if test "$TOOLKIT" = "auto"; then + TOOLKIT=$WX_PORT + fi + + dnl in case the user needs a BUILD=debug/release var... + if test "$DEBUG" = "1"; then + BUILD="debug" + elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then + BUILD="release" + fi + + dnl respect the DEBUG variable adding the optimize/debug flags + dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we + dnl don't need to set them, too + if test "$DEBUG" = "1"; then + CXXFLAGS="$CXXFLAGS -g -O0" + CFLAGS="$CFLAGS -g -O0" + else + CXXFLAGS="$CXXFLAGS -O2" + CFLAGS="$CFLAGS -O2" + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], +dnl [what to print when var is 1], +dnl [what to print when var is 0]) +dnl +dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. +dnl This macro mainly exists just to make configure.ac scripts more readable. +dnl +dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments +dnl if you want that m4 avoid to throw away the spaces prefixed to the +dnl argument value. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_BOOLOPT_SUMMARY], + [ + if test "x$$1" = "x1" ; then + echo $2 + elif test "x$$1" = "x0" ; then + echo $3 + else + echo "$1 is $$1" + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl +dnl Shows a summary message to the user about the WX_* variable contents. +dnl This macro is used typically at the end of the configure script. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], + [ + echo + echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" + echo " has the following settings:" + WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) + WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) + WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) + echo " - VERSION: $WX_VERSION" + echo " - PORT: $WX_PORT" + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl +dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info +dnl about the configuration of the package which used the wxpresets. +dnl +dnl Typical usage: +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN +dnl echo " - Package setting 1: $SETTING1" +dnl echo " - Package setting 2: $SETTING1" +dnl ... +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], + [ + echo + echo " ----------------------------------------------------------------" + echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." + echo " Summary of main configuration settings for $PACKAGE_NAME:" + WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) + WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) + WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) + ]) + +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], + [ + WX_STANDARD_OPTIONS_SUMMARY_MSG + echo + echo " Now, just run make." + echo " ----------------------------------------------------------------" + echo + ]) + + +dnl --------------------------------------------------------------------------- +dnl Deprecated macro wrappers +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) +AC_DEFUN([AM_PATH_WXCONFIG], [ + WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) +]) +AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) diff --git a/assdraw/osx-bundle.sh b/assdraw/osx-bundle.sh new file mode 100755 index 0000000000000000000000000000000000000000..0c0570a45900951a690c1c79c71dd900861b4259 --- /dev/null +++ b/assdraw/osx-bundle.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +BUNDLE_ROOT="$(dirname $0)/Assdraw.app/" +SRC_DIR="$(dirname $0)" + +if test -d "${BUNDLE_ROOT}"; then + rm -rf "${BUNDLE_ROOT}" +fi + +mkdir -p "${BUNDLE_ROOT}/Contents/MacOS" + +cp "${SRC_DIR}/src/assdraw" "${BUNDLE_ROOT}/Contents/MacOS/assdraw" + +python ../../aegisub/tools/osx-fix-libs.py "${BUNDLE_ROOT}/Contents/MacOS/assdraw" + +cat << 'EOF' > "${BUNDLE_ROOT}/Info.plist" +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>assdraw</string> + <key>CFBundleIdentifier</key> + <string>com.aegisub.assdraw</string> + <key>CFBundleName</key> + <string>ASSDraw3</string> + <key>CFBundleDisplayName</key> + <string>ASSDraw3</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>LSHasLocalizedDisplayName</key> + <false/> +</dict> +</plist> +EOF diff --git a/assdraw/src/ASSDraw3.dev b/assdraw/src/ASSDraw3.dev new file mode 100644 index 0000000000000000000000000000000000000000..5afb0aa9216c2e0828d6b064b59b480a5326067c --- /dev/null +++ b/assdraw/src/ASSDraw3.dev @@ -0,0 +1,323 @@ +[Project] +FileName=ASSDraw3.dev +Name=ASSDraw +UnitCount=26 +Type=0 +Ver=3 +IsCpp=1 +Folders=AGG +CommandLine= +CompilerSettings=0000000001001000000100 +PchHead=-1 +PchSource=-1 +ProfilesCount=1 +ProfileIndex=0 + +[Unit1] +FileName=assdraw.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=3 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName=ai-chan +FileVersion=3.0.0.0 +FileDescription=A tool for designing shapes to be used in ASS subtitle +InternalName=ASSDraw3 +LegalCopyright= +LegalTrademarks= +OriginalFilename=ASSDraw3.exe +ProductName=ASSDraw +ProductVersion=3 +AutoIncBuildNrOnRebuild=0 +AutoIncBuildNrOnCompile=0 +UnitCount=20 + +[Unit3] +FileName=cmd.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=engine.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=assdraw.rc +CompileCpp=1 +Folder=Resources +Compile=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=engine.cpp +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit9] +FileName=include_once.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=assdraw.hpp +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit2] +FileName=cmd.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Profile1] +ProfileName=Default Profile +Type=0 +ObjFiles= +Includes=E:\DEV;E:\DEV\agg-2.5\include;E:\DEV\wxTreeMultiCtrl\include +Libs=E:\DEV\agg-2.5;E:\DEV\wxTreeMultiCtrl +PrivateResource=E:\DEV\_projects\ASSDraw 3\Default Profile\ASSDraw_private.rc +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler=-D__WXMSW__ -DNO_GCC_PRAGMA -fno-rtti -fno-exceptions_@@_ -Wno-deprecated_@@_ +Linker=-lwxmsw28_propgrid_@@_-mwindows_@@_-lwxmsw28_@@_-lwxmsw28_gl_@@_-lwxtiff_@@_-lwxjpeg_@@_-lwxpng_@@_-lwxzlib_@@_-lwxregex_@@_-lwxexpat_@@_-lkernel32_@@_-luser32_@@_-lgdi32_@@_-lcomdlg32_@@_-lwinspool_@@_-lwinmm_@@_-lshell32_@@_-lcomctl32_@@_-lole32_@@_-loleaut32_@@_-luuid_@@_-lrpcrt4_@@_-ladvapi32_@@_-lwsock32_@@_-lodbc32_@@_-lopengl32_@@_-lagg_@@_ +PreprocDefines= +CompilerSettings=0000000001001000000100 +Icon= +ExeOutput=E:\DEV\_projects\ASSDraw 3\Default Profile\ +ObjectOutput=E:\DEV\_projects\ASSDraw 3\Default Profile\ +OverrideOutput=1 +OverrideOutputName=ASSDraw3.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=1 +SupportXPThemes=1 +CompilerSet=0 +compilerType=0 + +[Unit8] +FileName=dlgctrl.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=resource.h +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=agg_bcspline.cpp +CompileCpp=1 +Folder=AGG +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=enums.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=library.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=library.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=wxAGG\AGGWindow.cpp +CompileCpp=1 +Folder=AGG +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=agg_vcgen_bcspline.cpp +CompileCpp=1 +Folder=AGG +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=canvas.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=canvas.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=dlgctrl.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=_common.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=settings.cpp +CompileCpp=1 +Folder=ASSDraw +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=settings.hpp +CompileCpp=1 +Folder=ASSDraw +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=assdraw_settings.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=agghelper.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=canvas_mouse.hpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=canvas_mouse.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/assdraw/src/ASSDraw3.layout b/assdraw/src/ASSDraw3.layout new file mode 100644 index 0000000000000000000000000000000000000000..8ed9b9f28e4d60002c700340c55b62c17d587131 --- /dev/null +++ b/assdraw/src/ASSDraw3.layout @@ -0,0 +1,185 @@ +[Editor_10] +CursorCol=32 +CursorRow=553 +TopLine=535 +LeftChar=1 +Open=1 +Top=0 +[Editor_7] +CursorCol=6 +CursorRow=227 +TopLine=197 +LeftChar=1 +Open=1 +Top=1 +[Editor_5] +CursorCol=11 +CursorRow=19 +TopLine=1 +LeftChar=1 +Open=1 +Top=0 +[Editor_18] +CursorCol=11 +CursorRow=14 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_19] +CursorCol=12 +CursorRow=3 +TopLine=3 +LeftChar=1 +Open=0 +Top=0 +[Editor_11] +CursorCol=8 +CursorRow=44 +TopLine=31 +LeftChar=1 +Open=0 +Top=0 +[Editor_3] +CursorCol=1 +CursorRow=268 +TopLine=243 +LeftChar=1 +Open=1 +Top=0 +[Editor_15] +CursorCol=15 +CursorRow=7 +TopLine=1 +LeftChar=1 +Open=1 +Top=0 +[Editor_8] +CursorCol=1 +CursorRow=69 +TopLine=33 +LeftChar=1 +Open=0 +Top=0 +[Editor_16] +CursorCol=2 +CursorRow=25 +TopLine=1 +LeftChar=1 +Open=0 +Top=0 +[Editor_0] +CursorCol=39 +CursorRow=212 +TopLine=184 +LeftChar=1 +Open=1 +Top=0 +[Editors] +Focused=7 +Order=5,0,10,17,3,6,7,22,21,20,15 +[Editor_1] +Open=0 +Top=0 +CursorCol=21 +CursorRow=63 +TopLine=30 +LeftChar=1 +[Editor_2] +Open=0 +Top=0 +CursorCol=7 +CursorRow=83 +TopLine=50 +LeftChar=1 +[Editor_4] +Open=0 +Top=0 +CursorCol=19 +CursorRow=21 +TopLine=21 +LeftChar=1 +[Editor_6] +Open=1 +Top=0 +CursorCol=1 +CursorRow=577 +TopLine=556 +LeftChar=1 +[Editor_9] +Open=0 +Top=0 +CursorCol=1 +CursorRow=1 +TopLine=1 +LeftChar=1 +[Editor_12] +Open=0 +Top=0 +CursorCol=6 +CursorRow=99 +TopLine=91 +LeftChar=1 +[Editor_13] +Open=0 +Top=0 +CursorCol=1 +CursorRow=204 +TopLine=170 +LeftChar=1 +[Editor_14] +Open=0 +Top=0 +CursorCol=1 +CursorRow=290 +TopLine=256 +LeftChar=1 +[Editor_17] +Open=1 +Top=0 +CursorCol=68 +CursorRow=133 +TopLine=112 +LeftChar=1 +[Editor_20] +Open=1 +Top=0 +CursorCol=46 +CursorRow=195 +TopLine=163 +LeftChar=1 +[Editor_21] +Open=1 +Top=0 +CursorCol=2 +CursorRow=58 +TopLine=57 +LeftChar=1 +[Editor_22] +Open=1 +Top=0 +CursorCol=32 +CursorRow=160 +TopLine=129 +LeftChar=1 +[Editor_23] +Open=0 +Top=0 +CursorCol=2 +CursorRow=6 +TopLine=1 +LeftChar=1 +[Editor_24] +CursorCol=1 +CursorRow=56 +TopLine=25 +LeftChar=1 +Open=0 +Top=0 +[Editor_25] +Open=0 +Top=0 +CursorCol=18 +CursorRow=8 +TopLine=1 +LeftChar=1 diff --git a/assdraw/src/Makefile.am b/assdraw/src/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..71667b1b92228d48fe4dd4ce9982fc10be677f22 --- /dev/null +++ b/assdraw/src/Makefile.am @@ -0,0 +1,43 @@ +SUFFIXES = .cpp + +SUBDIRS = wxAGG xpm + +AM_CXXFLAGS = @WX_CPPFLAGS@ @LIBAGG_CFLAGS@ + +bin_PROGRAMS = assdraw +#assdraw_CPPFLAGS = +assdraw_LDFLAGS = @WX_LIBS@ @LIBAGG_LIBS@ +assdraw_LDADD = wxAGG/libaggwindow.a xpm/libres.a + +assdraw_SOURCES = \ + agg_bcspline.cpp \ + agg_vcgen_bcspline.cpp \ + assdraw.cpp \ + assdraw_settings.cpp \ + canvas.cpp \ + canvas_mouse.cpp \ + cmd.cpp \ + dlgctrl.cpp \ + engine.cpp \ + library.cpp \ + settings.cpp + +assdraw_SOURCES += \ + agg_bcspline.h \ + agg_conv_bcspline.h \ + agg_vcgen_bcspline.h \ + resource.h + +EXTRA_DIST = \ + _common.hpp \ + agghelper.hpp + assdraw.hpp \ + canvas.hpp \ + canvas_mouse.hpp \ + cmd.hpp \ + dlgctrl.hpp \ + engine.hpp \ + enums.hpp \ + include_once.hpp \ + library.hpp \ + settings.hpp diff --git a/assdraw/src/Makefile.win b/assdraw/src/Makefile.win new file mode 100644 index 0000000000000000000000000000000000000000..aa45a440ec6a583cb26ccafc1cba11f15dfa1f6d --- /dev/null +++ b/assdraw/src/Makefile.win @@ -0,0 +1,69 @@ +# Project: ASSDraw +# Compiler: Default GCC compiler +# Compiler Type: MingW 3 +# Makefile created by wxDev-C++ 6.10.2 on 20/01/08 23:46 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +OBJ = ../Default\ Profile/assdraw.o ../Default\ Profile/cmd.o ../Default\ Profile/engine.o ../Default\ Profile/dlgctrl.o ../Default\ Profile/canvas.o ../Default\ Profile/AGGWindow.o ../Default\ Profile/agg_vcgen_bcspline.o ../Default\ Profile/agg_bcspline.o ../Default\ Profile/library.o ../Default\ Profile/settings.o ../Default\ Profile/assdraw_settings.o ../Default\ Profile/canvas_mouse.o ../Default\ Profile/ASSDraw3_private.res +LINKOBJ = "../Default Profile/assdraw.o" "../Default Profile/cmd.o" "../Default Profile/engine.o" "../Default Profile/dlgctrl.o" "../Default Profile/canvas.o" "../Default Profile/AGGWindow.o" "../Default Profile/agg_vcgen_bcspline.o" "../Default Profile/agg_bcspline.o" "../Default Profile/library.o" "../Default Profile/settings.o" "../Default Profile/assdraw_settings.o" "../Default Profile/canvas_mouse.o" "../Default Profile/ASSDraw3_private.res" +LIBS = -L"D:/Program Files/Dev-Cpp/Lib" -L"E:/DEV/agg-2.5" -L"E:/DEV/wxTreeMultiCtrl" -lwxmsw28_propgrid -mwindows -lwxmsw28 -lwxmsw28_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 -lagg -s +INCS = -I"include" -I"E:/DEV" -I"E:/DEV/agg-2.5/include" -I"E:/DEV/wxTreeMultiCtrl/include" +CXXINCS = -I"D:/Program Files/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/Program Files/Dev-Cpp/include/c++/3.4.2" -I"D:/Program Files/Dev-Cpp/include" -I"D:/Program Files/Dev-Cpp/" -I"D:/Program Files/Dev-Cpp/include/common/wx/msw" -I"D:/Program Files/Dev-Cpp/include/common/wx/generic" -I"D:/Program Files/Dev-Cpp/include/common/wx/fl" -I"D:/Program Files/Dev-Cpp/include/common/wx/gizmos" -I"D:/Program Files/Dev-Cpp/include/common/wx/html" -I"D:/Program Files/Dev-Cpp/include/common/wx/mmedia" -I"D:/Program Files/Dev-Cpp/include/common/wx/net" -I"D:/Program Files/Dev-Cpp/include/common/wx/ogl" -I"D:/Program Files/Dev-Cpp/include/common/wx/plot" -I"D:/Program Files/Dev-Cpp/include/common/wx/protocol" -I"D:/Program Files/Dev-Cpp/include/common/wx/stc" -I"D:/Program Files/Dev-Cpp/include/common/wx/svg" -I"D:/Program Files/Dev-Cpp/include/common/wx/xml" -I"D:/Program Files/Dev-Cpp/include/common/wx/xrc" -I"D:/Program Files/Dev-Cpp/include/common/wx" -I"D:/Program Files/Dev-Cpp/include/common" -I"E:/dev/ACE-5.5" -I"E:/DEV" -I"E:/DEV/agg-2.5/include" -I"E:/DEV/wxTreeMultiCtrl/include" +RCINCS = --include-dir "D:/PROGRA~1/Dev-Cpp/include/common" +BIN = ../Default\ Profile/ASSDraw3.exe +DEFINES = +CXXFLAGS = $(CXXINCS) $(DEFINES) -D__WXMSW__ -DNO_GCC_PRAGMA -fno-rtti -fno-exceptions -Wno-deprecated -fexpensive-optimizations -O3 +CFLAGS = $(INCS) $(DEFINES) -fexpensive-optimizations -O3 +GPROF = gprof.exe +RM = rm -f +LINK = g++.exe + +.PHONY: all all-before all-after clean clean-custom +all: all-before $(BIN) all-after + +clean: clean-custom + $(RM) $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(LINK) $(LINKOBJ) -o "..\Default Profile\ASSDraw3.exe" $(LIBS) + +../Default\ Profile/assdraw.o: $(GLOBALDEPS) assdraw.cpp assdraw.hpp _common.hpp enums.hpp include_once.hpp + $(CPP) -c assdraw.cpp -o "../Default Profile/assdraw.o" $(CXXFLAGS) + +../Default\ Profile/cmd.o: $(GLOBALDEPS) cmd.cpp + $(CPP) -c cmd.cpp -o "../Default Profile/cmd.o" $(CXXFLAGS) + +../Default\ Profile/engine.o: $(GLOBALDEPS) engine.cpp + $(CPP) -c engine.cpp -o "../Default Profile/engine.o" $(CXXFLAGS) + +../Default\ Profile/dlgctrl.o: $(GLOBALDEPS) dlgctrl.cpp assdraw.hpp _common.hpp + $(CPP) -c dlgctrl.cpp -o "../Default Profile/dlgctrl.o" $(CXXFLAGS) + +../Default\ Profile/canvas.o: $(GLOBALDEPS) canvas.cpp assdraw.hpp _common.hpp cmd.hpp agghelper.hpp + $(CPP) -c canvas.cpp -o "../Default Profile/canvas.o" $(CXXFLAGS) + +../Default\ Profile/AGGWindow.o: $(GLOBALDEPS) wxAGG/AGGWindow.cpp wxAGG/AGGWindow.h wxAGG/PixelFormatConvertor.h + $(CPP) -c wxAGG/AGGWindow.cpp -o "../Default Profile/AGGWindow.o" $(CXXFLAGS) + +../Default\ Profile/agg_vcgen_bcspline.o: $(GLOBALDEPS) agg_vcgen_bcspline.cpp agg_vcgen_bcspline.h agg_bcspline.h + $(CPP) -c agg_vcgen_bcspline.cpp -o "../Default Profile/agg_vcgen_bcspline.o" $(CXXFLAGS) + +../Default\ Profile/agg_bcspline.o: $(GLOBALDEPS) agg_bcspline.cpp agg_bcspline.h + $(CPP) -c agg_bcspline.cpp -o "../Default Profile/agg_bcspline.o" $(CXXFLAGS) + +../Default\ Profile/library.o: $(GLOBALDEPS) library.cpp assdraw.hpp _common.hpp library.hpp engine.hpp _common.hpp wxAGG/AGGWindow.h wxAGG/PixelFormatConvertor.h agg_conv_bcspline.h agg_vcgen_bcspline.h agg_bcspline.h + $(CPP) -c library.cpp -o "../Default Profile/library.o" $(CXXFLAGS) + +../Default\ Profile/settings.o: $(GLOBALDEPS) settings.cpp assdraw.hpp _common.hpp settings.hpp _common.hpp + $(CPP) -c settings.cpp -o "../Default Profile/settings.o" $(CXXFLAGS) + +../Default\ Profile/assdraw_settings.o: $(GLOBALDEPS) assdraw_settings.cpp assdraw.hpp _common.hpp + $(CPP) -c assdraw_settings.cpp -o "../Default Profile/assdraw_settings.o" $(CXXFLAGS) + +../Default\ Profile/canvas_mouse.o: $(GLOBALDEPS) canvas_mouse.cpp canvas_mouse.hpp _common.hpp enums.hpp engine.hpp _common.hpp wxAGG/AGGWindow.h wxAGG/PixelFormatConvertor.h agg_conv_bcspline.h agg_vcgen_bcspline.h agg_bcspline.h canvas.hpp engine.hpp enums.hpp + $(CPP) -c canvas_mouse.cpp -o "../Default Profile/canvas_mouse.o" $(CXXFLAGS) + +../Default\ Profile/ASSDraw3_private.res: ../Default\ Profile/ASSDraw3_private.rc assdraw.rc + $(WINDRES) --input-format=rc -o "../Default Profile/ASSDraw3_private.res" $(RCINCS) ../DEFAUL~1/ASSDRA~1.RC -O coff diff --git a/assdraw/src/_common.hpp b/assdraw/src/_common.hpp new file mode 100644 index 0000000000000000000000000000000000000000..93c17f23559b2376fec4baa155e1357f6d107e99 --- /dev/null +++ b/assdraw/src/_common.hpp @@ -0,0 +1,14 @@ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#define TITLE wxT("ASSDraw3") + +#define __DPDS__ wxDefaultPosition, wxDefaultSize diff --git a/assdraw/src/agg_bcspline.cpp b/assdraw/src/agg_bcspline.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d6973c04a9325a29df172e3e8f6f1c9a684dfd69 --- /dev/null +++ b/assdraw/src/agg_bcspline.cpp @@ -0,0 +1,289 @@ +//---------------------------------------------------------------------------- +// Anti-Grain Geometry (AGG) - Version 2.5 +// A high quality rendering engine for C++ +// Copyright (C) 2002-2006 Maxim Shemanarev +// Contact: mcseem@antigrain.com +// mcseemagg@yahoo.com +// http://antigrain.com +// +// AGG is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// AGG is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with AGG; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301, USA. +//---------------------------------------------------------------------------- + +#include "agg_bcspline.h" + +namespace agg +{ + //------------------------------------------------------------------------ + bcspline::bcspline() : + m_max(0), + m_num(0), + m_x(0), + m_y(0), + m_last_idx(-1) + { + } + + //------------------------------------------------------------------------ + bcspline::bcspline(int num) : + m_max(0), + m_num(0), + m_x(0), + m_y(0), + m_last_idx(-1) + { + init(num); + } + + //------------------------------------------------------------------------ + bcspline::bcspline(int num, const double* x, const double* y) : + m_max(0), + m_num(0), + m_x(0), + m_y(0), + m_last_idx(-1) + { + init(num, x, y); + } + + + //------------------------------------------------------------------------ + void bcspline::init(int max) + { + if(max > 2 && max > m_max) + { + m_am.resize(max * 3); + m_max = max; + m_x = &m_am[m_max]; + m_y = &m_am[m_max * 2]; + } + m_num = 0; + m_last_idx = -1; + } + + + //------------------------------------------------------------------------ + void bcspline::add_point(double x, double y) + { + if(m_num < m_max) + { + m_x[m_num] = x; + m_y[m_num] = y; + ++m_num; + } + } + + + //------------------------------------------------------------------------ + void bcspline::prepare() + { + if(m_num > 2) + { + int i, k, n1; + double* temp; + double* r; + double* s; + double h, p, d, f, e; + + for(k = 0; k < m_num; k++) + { + m_am[k] = 0.0; + } + + n1 = 3 * m_num; + + pod_array<double> al(n1); + temp = &al[0]; + + for(k = 0; k < n1; k++) + { + temp[k] = 0.0; + } + + r = temp + m_num; + s = temp + m_num * 2; + + n1 = m_num - 1; + d = m_x[1] - m_x[0]; + e = (m_y[1] - m_y[0]) / d; + + for(k = 1; k < n1; k++) + { + h = d; + d = m_x[k + 1] - m_x[k]; + f = e; + e = (m_y[k + 1] - m_y[k]) / d; + al[k] = d / (d + h); + r[k] = 1.0 - al[k]; + s[k] = 6.0 * (e - f) / (h + d); + } + + for(k = 1; k < n1; k++) + { + p = 1.0 / (r[k] * al[k - 1] + 2.0); + al[k] *= -p; + s[k] = (s[k] - r[k] * s[k - 1]) * p; + } + + m_am[n1] = 0.0; + al[n1 - 1] = s[n1 - 1]; + m_am[n1 - 1] = al[n1 - 1]; + + for(k = n1 - 2, i = 0; i < m_num - 2; i++, k--) + { + al[k] = al[k] * al[k + 1] + s[k]; + m_am[k] = al[k]; + } + } + m_last_idx = -1; + } + + + + //------------------------------------------------------------------------ + void bcspline::init(int num, const double* x, const double* y) + { + if(num > 2) + { + init(num); + int i; + for(i = 0; i < num; i++) + { + add_point(*x++, *y++); + } + prepare(); + } + m_last_idx = -1; + } + + + //------------------------------------------------------------------------ + void bcspline::bsearch(int n, const double *x, double x0, int *i) + { + int j = n - 1; + int k; + + for(*i = 0; (j - *i) > 1; ) + { + if(x0 < x[k = (*i + j) >> 1]) j = k; + else *i = k; + } + } + + + + //------------------------------------------------------------------------ + double bcspline::interpolation(double x, int i) const + { + int j = i + 1; + double d = m_x[i] - m_x[j]; + double h = x - m_x[j]; + double r = m_x[i] - x; + double p = d * d / 6.0; + return (m_am[j] * r * r * r + m_am[i] * h * h * h) / 6.0 / d + + ((m_y[j] - m_am[j] * p) * r + (m_y[i] - m_am[i] * p) * h) / d; + } + + + //------------------------------------------------------------------------ + double bcspline::extrapolation_left(double x) const + { + double d = m_x[1] - m_x[0]; + return (-d * m_am[1] / 6 + (m_y[1] - m_y[0]) / d) * + (x - m_x[0]) + + m_y[0]; + } + + //------------------------------------------------------------------------ + double bcspline::extrapolation_right(double x) const + { + double d = m_x[m_num - 1] - m_x[m_num - 2]; + return (d * m_am[m_num - 2] / 6 + (m_y[m_num - 1] - m_y[m_num - 2]) / d) * + (x - m_x[m_num - 1]) + + m_y[m_num - 1]; + } + + //------------------------------------------------------------------------ + double bcspline::get(double x) const + { + if(m_num > 2) + { + int i; + + // Extrapolation on the left + if(x < m_x[0]) return extrapolation_left(x); + + // Extrapolation on the right + if(x >= m_x[m_num - 1]) return extrapolation_right(x); + + // Interpolation + bsearch(m_num, m_x, x, &i); + return interpolation(x, i); + } + return 0.0; + } + + + //------------------------------------------------------------------------ + double bcspline::get_stateful(double x) const + { + if(m_num > 2) + { + // Extrapolation on the left + if(x < m_x[0]) return extrapolation_left(x); + + // Extrapolation on the right + if(x >= m_x[m_num - 1]) return extrapolation_right(x); + + if(m_last_idx >= 0) + { + // Check if x is not in current range + if(x < m_x[m_last_idx] || x > m_x[m_last_idx + 1]) + { + // Check if x between next points (most probably) + if(m_last_idx < m_num - 2 && + x >= m_x[m_last_idx + 1] && + x <= m_x[m_last_idx + 2]) + { + ++m_last_idx; + } + else + if(m_last_idx > 0 && + x >= m_x[m_last_idx - 1] && + x <= m_x[m_last_idx]) + { + // x is between pevious points + --m_last_idx; + } + else + { + // Else perform full search + bsearch(m_num, m_x, x, &m_last_idx); + } + } + return interpolation(x, m_last_idx); + } + else + { + // Interpolation + bsearch(m_num, m_x, x, &m_last_idx); + return interpolation(x, m_last_idx); + } + } + return 0.0; + } + +} + diff --git a/assdraw/src/agg_bcspline.h b/assdraw/src/agg_bcspline.h new file mode 100644 index 0000000000000000000000000000000000000000..05d2364978ffdc8f920cfa0fd01fb5c975dee97b --- /dev/null +++ b/assdraw/src/agg_bcspline.h @@ -0,0 +1,81 @@ +//---------------------------------------------------------------------------- +// Anti-Grain Geometry (AGG) - Version 2.5 +// A high quality rendering engine for C++ +// Copyright (C) 2002-2006 Maxim Shemanarev +// Contact: mcseem@antigrain.com +// mcseemagg@yahoo.com +// http://antigrain.com +// +// AGG is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// AGG is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with AGG; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301, USA. +//---------------------------------------------------------------------------- + +#ifndef AGG_bcspline_INCLUDED +#define AGG_bcspline_INCLUDED + +#include "agg_array.h" + +namespace agg +{ + //----------------------------------------------------------------bcspline + // A very simple class of Bi-cubic Spline interpolation. + // First call init(num, x[], y[]) where num - number of source points, + // x, y - arrays of X and Y values respectively. Here Y must be a function + // of X. It means that all the X-coordinates must be arranged in the ascending + // order. + // Then call get(x) that calculates a value Y for the respective X. + // The class supports extrapolation, i.e. you can call get(x) where x is + // outside the given with init() X-range. Extrapolation is a simple linear + // function. + // + // See Implementation agg_bcspline.cpp + //------------------------------------------------------------------------ + class bcspline + { + public: + bcspline(); + bcspline(int num); + bcspline(int num, const double* x, const double* y); + + void init(int num); + void add_point(double x, double y); + void prepare(); + + void init(int num, const double* x, const double* y); + + double get(double x) const; + double get_stateful(double x) const; + + private: + bcspline(const bcspline&); + const bcspline& operator = (const bcspline&); + + static void bsearch(int n, const double *x, double x0, int *i); + double extrapolation_left(double x) const; + double extrapolation_right(double x) const; + double interpolation(double x, int i) const; + + int m_max; + int m_num; + double* m_x; + double* m_y; + pod_array<double> m_am; + mutable int m_last_idx; + }; + + +} + +#endif diff --git a/assdraw/src/agg_conv_bcspline.h b/assdraw/src/agg_conv_bcspline.h new file mode 100644 index 0000000000000000000000000000000000000000..3d40b9619193291dda4ebeff3ae26aa076a5bb48 --- /dev/null +++ b/assdraw/src/agg_conv_bcspline.h @@ -0,0 +1,58 @@ +//---------------------------------------------------------------------------- +// Anti-Grain Geometry (AGG) - Version 2.5 +// A high quality rendering engine for C++ +// Copyright (C) 2002-2006 Maxim Shemanarev +// Contact: mcseem@antigrain.com +// mcseemagg@yahoo.com +// http://antigrain.com +// +// AGG is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// AGG is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with AGG; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301, USA. +//---------------------------------------------------------------------------- + +#ifndef AGG_conv_bcspline_INCLUDED +#define AGG_conv_bcspline_INCLUDED + +#include "agg_basics.h" +#include "agg_vcgen_bcspline.h" +#include "agg_conv_adaptor_vcgen.h" + + +namespace agg +{ + + //---------------------------------------------------------conv_bcspline + template<class VertexSource> + struct conv_bcspline : public conv_adaptor_vcgen<VertexSource, vcgen_bcspline> + { + typedef conv_adaptor_vcgen<VertexSource, vcgen_bcspline> base_type; + + conv_bcspline(VertexSource& vs) : + conv_adaptor_vcgen<VertexSource, vcgen_bcspline>(vs) {} + + void interpolation_step(double v) { base_type::generator().interpolation_step(v); } + double interpolation_step() const { return base_type::generator().interpolation_step(); } + + private: + conv_bcspline(const conv_bcspline<VertexSource>&); + const conv_bcspline<VertexSource>& + operator = (const conv_bcspline<VertexSource>&); + }; + +} + + +#endif + diff --git a/assdraw/src/agg_vcgen_bcspline.cpp b/assdraw/src/agg_vcgen_bcspline.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5796b1277105c7c0efd679bf5aaae5e641c7294a --- /dev/null +++ b/assdraw/src/agg_vcgen_bcspline.cpp @@ -0,0 +1,203 @@ +//---------------------------------------------------------------------------- +// Anti-Grain Geometry (AGG) - Version 2.5 +// A high quality rendering engine for C++ +// Copyright (C) 2002-2006 Maxim Shemanarev +// Contact: mcseem@antigrain.com +// mcseemagg@yahoo.com +// http://antigrain.com +// +// AGG is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// AGG is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with AGG; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301, USA. +//---------------------------------------------------------------------------- + +#include "agg_vcgen_bcspline.h" + +namespace agg +{ + + //------------------------------------------------------------------------ + vcgen_bcspline::vcgen_bcspline() : + m_src_vertices(), + m_spline_x(), + m_spline_y(), + m_interpolation_step(1.0/50.0), + m_closed(0), + m_status(initial), + m_src_vertex(0) + { + } + + + //------------------------------------------------------------------------ + void vcgen_bcspline::remove_all() + { + m_src_vertices.remove_all(); + m_closed = 0; + m_status = initial; + m_src_vertex = 0; + } + + + //------------------------------------------------------------------------ + void vcgen_bcspline::add_vertex(double x, double y, unsigned cmd) + { + m_status = initial; + if(is_move_to(cmd)) + { + m_src_vertices.modify_last(point_d(x, y)); + } + else + { + if(is_vertex(cmd)) + { + m_src_vertices.add(point_d(x, y)); + } + else + { + m_closed = get_close_flag(cmd); + } + } + } + + + //------------------------------------------------------------------------ + void vcgen_bcspline::rewind(unsigned) + { + m_cur_abscissa = 0.0; + m_max_abscissa = 0.0; + m_src_vertex = 0; + if(m_status == initial && m_src_vertices.size() > 2) + { + if(m_closed) + { + m_spline_x.init(m_src_vertices.size() + 8); + m_spline_y.init(m_src_vertices.size() + 8); + m_spline_x.add_point(0.0, m_src_vertices.prev(m_src_vertices.size() - 3).x); + m_spline_y.add_point(0.0, m_src_vertices.prev(m_src_vertices.size() - 3).y); + m_spline_x.add_point(1.0, m_src_vertices[m_src_vertices.size() - 3].x); + m_spline_y.add_point(1.0, m_src_vertices[m_src_vertices.size() - 3].y); + m_spline_x.add_point(2.0, m_src_vertices[m_src_vertices.size() - 2].x); + m_spline_y.add_point(2.0, m_src_vertices[m_src_vertices.size() - 2].y); + m_spline_x.add_point(3.0, m_src_vertices[m_src_vertices.size() - 1].x); + m_spline_y.add_point(3.0, m_src_vertices[m_src_vertices.size() - 1].y); + } + else + { + m_spline_x.init(m_src_vertices.size()); + m_spline_y.init(m_src_vertices.size()); + } + unsigned i; + for(i = 0; i < m_src_vertices.size(); i++) + { + double x = m_closed ? i + 4 : i; + m_spline_x.add_point(x, m_src_vertices[i].x); + m_spline_y.add_point(x, m_src_vertices[i].y); + } + m_cur_abscissa = 0.0; + m_max_abscissa = m_src_vertices.size() - 1; + if(m_closed) + { + m_cur_abscissa = 4.0; + m_max_abscissa += 5.0; + m_spline_x.add_point(m_src_vertices.size() + 4, m_src_vertices[0].x); + m_spline_y.add_point(m_src_vertices.size() + 4, m_src_vertices[0].y); + m_spline_x.add_point(m_src_vertices.size() + 5, m_src_vertices[1].x); + m_spline_y.add_point(m_src_vertices.size() + 5, m_src_vertices[1].y); + m_spline_x.add_point(m_src_vertices.size() + 6, m_src_vertices[2].x); + m_spline_y.add_point(m_src_vertices.size() + 6, m_src_vertices[2].y); + m_spline_x.add_point(m_src_vertices.size() + 7, m_src_vertices.next(2).x); + m_spline_y.add_point(m_src_vertices.size() + 7, m_src_vertices.next(2).y); + } + m_spline_x.prepare(); + m_spline_y.prepare(); + } + m_status = ready; + } + + + + + + + //------------------------------------------------------------------------ + unsigned vcgen_bcspline::vertex(double* x, double* y) + { + unsigned cmd = path_cmd_line_to; + while(!is_stop(cmd)) + { + switch(m_status) + { + case initial: + rewind(0); + + case ready: + if(m_src_vertices.size() < 2) + { + cmd = path_cmd_stop; + break; + } + + if(m_src_vertices.size() == 2) + { + *x = m_src_vertices[m_src_vertex].x; + *y = m_src_vertices[m_src_vertex].y; + m_src_vertex++; + if(m_src_vertex == 1) return path_cmd_move_to; + if(m_src_vertex == 2) return path_cmd_line_to; + cmd = path_cmd_stop; + break; + } + + cmd = path_cmd_move_to; + m_status = polygon; + m_src_vertex = 0; + + case polygon: + if(m_cur_abscissa >= m_max_abscissa) + { + if(m_closed) + { + m_status = end_poly; + break; + } + else + { + *x = m_src_vertices[m_src_vertices.size() - 1].x; + *y = m_src_vertices[m_src_vertices.size() - 1].y; + m_status = end_poly; + return path_cmd_line_to; + } + } + + *x = m_spline_x.get(m_cur_abscissa); + *y = m_spline_y.get(m_cur_abscissa); + m_src_vertex++; + m_cur_abscissa += m_interpolation_step; + return (m_src_vertex == 1) ? path_cmd_move_to : path_cmd_line_to; + + case end_poly: + m_status = stop; + return path_cmd_end_poly | m_closed; + + case stop: + return path_cmd_stop; + } + } + return cmd; + } + + +} + diff --git a/assdraw/src/agg_vcgen_bcspline.h b/assdraw/src/agg_vcgen_bcspline.h new file mode 100644 index 0000000000000000000000000000000000000000..6f92d994201171311b56a723f59bbfe811ffb960 --- /dev/null +++ b/assdraw/src/agg_vcgen_bcspline.h @@ -0,0 +1,83 @@ +//---------------------------------------------------------------------------- +// Anti-Grain Geometry (AGG) - Version 2.5 +// A high quality rendering engine for C++ +// Copyright (C) 2002-2006 Maxim Shemanarev +// Contact: mcseem@antigrain.com +// mcseemagg@yahoo.com +// http://antigrain.com +// +// AGG is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// AGG is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with AGG; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// MA 02110-1301, USA. +//---------------------------------------------------------------------------- + +#ifndef AGG_vcgen_bcspline_INCLUDED +#define AGG_vcgen_bcspline_INCLUDED + +#include "agg_basics.h" +#include "agg_array.h" +#include "agg_bcspline.h" + + +namespace agg +{ + + //==========================================================vcgen_bcspline + class vcgen_bcspline + { + enum status_e + { + initial, + ready, + polygon, + end_poly, + stop + }; + + public: + typedef pod_bvector<point_d, 6> vertex_storage; + + vcgen_bcspline(); + + void interpolation_step(double v) { m_interpolation_step = v; } + double interpolation_step() const { return m_interpolation_step; } + + // Vertex Generator Interface + void remove_all(); + void add_vertex(double x, double y, unsigned cmd); + + // Vertex Source Interface + void rewind(unsigned path_id); + unsigned vertex(double* x, double* y); + + private: + vcgen_bcspline(const vcgen_bcspline&); + const vcgen_bcspline& operator = (const vcgen_bcspline&); + + vertex_storage m_src_vertices; + bcspline m_spline_x; + bcspline m_spline_y; + double m_interpolation_step; + unsigned m_closed; + status_e m_status; + unsigned m_src_vertex; + double m_cur_abscissa; + double m_max_abscissa; + }; + +} + + +#endif + diff --git a/assdraw/src/agghelper.hpp b/assdraw/src/agghelper.hpp new file mode 100644 index 0000000000000000000000000000000000000000..de0ce66fccccd7c019d6a67ae540063bdf551a38 --- /dev/null +++ b/assdraw/src/agghelper.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "agg_path_storage.h" + +class agghelper +{ +public: + + static agg::path_storage RectanglePath(double left, double right, double top, double bottom) + { + agg::path_storage path; + path.move_to(left,top); + path.line_to(right,top); + path.line_to(right,bottom); + path.line_to(left,bottom); + path.line_to(left,top); + return path; + } + +}; diff --git a/assdraw/src/assdraw.cpp b/assdraw/src/assdraw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1c9696083a8cbb7f995ae05c79885c0fe01f6eb6 --- /dev/null +++ b/assdraw/src/assdraw.cpp @@ -0,0 +1,741 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: assdraw.cpp +// Purpose: ASSDraw main source file +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + + +#include "assdraw.hpp" +#include "enums.hpp" +#include "include_once.hpp" +#include <wx/clipbrd.h> +#include <wx/wfstream.h> +#include <wx/filename.h> +#include <wx/dynlib.h> +#include <wx/stdpaths.h> + +#if !defined(__WINDOWS__) +#include "xpm/res.h" +#endif + +///////////// +// Libraries +#ifdef __VISUALC__ +#pragma comment(lib, "Vfw32.lib") +#pragma comment(lib, "comctl32.lib") +#pragma comment(lib, "rpcrt4.lib") +#pragma comment(lib, "winmm.lib") +#pragma comment(lib, "advapi32.lib") +#pragma comment(lib, "wsock32.lib") +#ifdef __WXDEBUG__ +#pragma comment(lib, "wxmsw28ud_propgrid.lib") +#else +#pragma comment(lib, "wxmsw28u_propgrid.lib") +#endif +#endif + + +//DEFINE_EVENT_TYPE(wxEVT_SETTINGS_CHANGED) + +// initialize wxWidget to accept our App class +IMPLEMENT_APP(ASSDrawApp) + +BEGIN_EVENT_TABLE(ASSDrawFrame, wxFrame) + EVT_TOOL(TB_CLEAR, ASSDrawFrame::OnSelect_Clear) + EVT_TOOL(TB_PREVIEW, ASSDrawFrame::OnSelect_Preview) + EVT_TOOL(TB_TRANSFORM, ASSDrawFrame::OnSelect_Transform) + EVT_TOOL_RANGE(MODE_ARR, MODE_DEL, ASSDrawFrame::OnChoose_Mode) + EVT_TOOL_RCLICKED(wxID_ANY, ASSDrawFrame::OnToolRClick) + EVT_COMMAND(wxID_ANY, wxEVT_SETTINGS_CHANGED, ASSDrawFrame::OnSettingsChanged) + EVT_MENU_RANGE(MENU_TB_ALL, MENU_TB_BGIMG, ASSDrawFrame::OnChoose_TBarRClickMenu) + EVT_MENU(MENU_CLEAR, ASSDrawFrame::OnSelect_Clear) + EVT_MENU(MENU_PREVIEW, ASSDrawFrame::OnSelect_Preview) + EVT_MENU(MENU_TRANSFORM, ASSDrawFrame::OnSelect_Transform) + EVT_MENU(MENU_LIBRARY, ASSDrawFrame::OnSelect_Library) + EVT_MENU(MENU_SETTINGS, ASSDrawFrame::OnSelect_Settings) + EVT_MENU(MENU_RESETPERSPECTIVE, ASSDrawFrame::OnSelect_ResetPerspective) + EVT_MENU(MENU_HELP, ASSDrawFrame::OnSelect_Help) + EVT_MENU(wxID_ABOUT, ASSDrawFrame::OnSelect_About) + EVT_MENU(MENU_UNDO, ASSDrawFrame::OnSelect_Undo) + EVT_MENU(MENU_REDO, ASSDrawFrame::OnSelect_Redo) + EVT_MENU(MENU_PASTE, ASSDrawFrame::OnSelect_Paste) + EVT_MENU(MENU_BGIMG_REMOVE, ASSDrawFrame::OnSelect_RemoveBG) + EVT_MENU(MENU_BGIMG_ALPHA, ASSDrawFrame::OnSelect_AlphaBG) + EVT_MENU_RANGE(MODE_ARR, MODE_NUT_BILINEAR, ASSDrawFrame::OnChoose_Mode) + EVT_MENU_RANGE(MENU_REPOS_TOPLEFT, MENU_REPOS_BOTRIGHT, ASSDrawFrame::OnChoose_Recenter) + EVT_MENU_RANGE(MENU_REPOS_BGTOPLEFT, MENU_REPOS_BGBOTRIGHT, ASSDrawFrame::OnChoose_RecenterToBG) + EVT_CLOSE(ASSDrawFrame::OnClose) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// the application class: ASSDrawApp +// ---------------------------------------------------------------------------- + +// 'Main program' equivalent: the program execution _T("starts") here +bool ASSDrawApp::OnInit() +{ + SetAppName(TITLE); + // create the main application window + ASSDrawFrame * assdrawframe = new ASSDrawFrame( this, TITLE, wxDefaultPosition, wxSize(640, 480) ); + SetTopWindow(assdrawframe); + return TRUE; +} + + + +// ---------------------------------------------------------------------------- +// main frame: ASSDrawFrame +// ---------------------------------------------------------------------------- + +// constructor + +ASSDrawFrame::ASSDrawFrame( wxApp *app, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxFrame(NULL, wxID_ANY, title, pos, size, style) +{ + m_app = app; + m_mgr.SetManagedWindow(this); +#ifndef __UNIX__ + m_mgr.SetFlags(m_mgr.GetFlags() | wxAUI_MGR_ALLOW_ACTIVE_PANE); +#else + m_mgr.SetFlags(wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_ALLOW_ACTIVE_PANE | wxAUI_MGR_RECTANGLE_HINT); +#endif + + // set the frame icon + SetIcon(wxICON(appico)); + + // Create status bar for the frame + CreateStatusBar(3); + int statwidths[] = { 64, -1, 64 }; + GetStatusBar()->SetStatusWidths(3, statwidths); + SetStatusBarPane(1); + + InitializeDefaultSettings(); + + // load config + configfile = wxFileName(wxStandardPaths::Get().GetUserDataDir(), _T("ASSDraw3.cfg")).GetFullPath(); + + bool firsttime = !::wxFileExists(configfile); + if (firsttime) { + wxFileName::Mkdir(wxStandardPaths::Get().GetUserDataDir(), wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL); + wxFileOutputStream(configfile).Close(); + } + wxFileInputStream cfgf(configfile); + config = new wxFileConfig(cfgf); + + // nullify transformdlg + transformdlg = NULL; + + Maximize(true); + Show(true); // to get the right client size, must call Show() first + + // config + LoadSettings(); + + // THE CANVAS + m_canvas = new ASSDrawCanvas( this , this ); + + // shapes library + shapelib = new ASSDrawShapeLibrary(this, this); + + // source text ctrl + srctxtctrl = new ASSDrawSrcTxtCtrl(this, this); + + // settings + settingsdlg = new ASSDrawSettingsDialog(this, this); + settingsdlg->Init(); + + SetMenus(); + SetToolBars(); + SetPanes(); + + // config + + config->SetPath(_T("info")); + wxString version; + config->Read(_T("version"), &version); + config->SetPath(_T("..")); + + default_perspective = m_mgr.SavePerspective(); // back up default perspective + config->SetPath(_T("perspective")); + wxString perspective; + if (config->Read(_T("perspective"), &perspective) && version == VERSION) m_mgr.LoadPerspective(perspective, false); + config->SetPath(_T("..")); + + config->SetPath(_T("library")); + int n = 0; + config->Read(_T("n"), &n); + for (int i = 0; i < n; i++) + { + wxString libcmds; + config->Read(wxString::Format(_T("%d"),i), &libcmds); + shapelib->AddShapePreview(libcmds); + } + config->SetPath(_T("..")); + + m_mgr.Update(); + m_canvas->SetFocus(); + m_canvas->Show(); + + wxSize clientsize = m_canvas->GetClientSize(); + m_canvas->ChangeZoomLevelTo(DEFAULT_SCALE, wxPoint(clientsize.x / 2, clientsize.y / 2)); + m_canvas->MoveCanvasOriginTo(clientsize.x / 2, clientsize.y / 2); + UpdateASSCommandStringToSrcTxtCtrl(m_canvas->GenerateASS()); + + UpdateFrameUI(); + ApplySettings(); + + if (firsttime) + _About(); + else if (!behaviors.nosplashscreen) + _About(3); + + helpcontroller.SetParentWindow(this); + helpcontroller.Initialize(wxFileName(::wxGetCwd(), _T("ASSDraw3.chm")).GetFullPath()); +} + +void ASSDrawFrame::SetToolBars() +{ + drawtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); + drawtbar->AddTool(TB_CLEAR, _T("Clear"), wxBITMAP(new_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_CLEAR); + //tbar->AddTool(TB_EDITSRC, _T("Source"), wxBITMAP(src_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_EDITSRC); + drawtbar->AddCheckTool(TB_PREVIEW, _T("Preview"), wxBITMAP(preview_), wxNullBitmap, _T(""), TIPS_PREVIEW); + //drawtbar->AddTool(TB_TRANSFORM, _T("Transform"), wxBITMAP(rot_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_TRANSFORM); + zoomslider = new wxSlider(drawtbar, TB_ZOOMSLIDER, 1000, 100, 5000, __DPDS__ ); + //zoomslider->SetSize(280, zoomslider->GetSize().y); + zoomslider->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + zoomslider->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + zoomslider->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + zoomslider->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + zoomslider->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + zoomslider->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this); + drawtbar->AddControl(zoomslider); + drawtbar->Realize(); + + m_mgr.AddPane(drawtbar, wxAuiPaneInfo().Name(_T("drawtbar")).Caption(TBNAME_DRAW). + ToolbarPane().Top().Position(0).Dockable(true).LeftDockable(false).RightDockable(false)); + + modetbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); + modetbar->AddRadioTool(MODE_ARR, _T("Drag"), wxBITMAP(arr_), wxNullBitmap, _T(""), TIPS_ARR); + modetbar->AddRadioTool(MODE_M, _T("Move"), wxBITMAP(m_), wxNullBitmap, _T(""), TIPS_M); + //modetbar->AddRadioTool(MODE_N, _T("Move*"), wxBITMAP(n_), wxNullBitmap, _T(""), TIPS_N); + modetbar->AddRadioTool(MODE_L, _T("Line"), wxBITMAP(l_), wxNullBitmap, _T(""), TIPS_L); + modetbar->AddRadioTool(MODE_B, _T("Bezier"), wxBITMAP(b_), wxNullBitmap, _T(""), TIPS_B); + //modetbar->AddRadioTool(MODE_S, _T("Spline"), wxBITMAP(s_), wxNullBitmap, _T(""), TIPS_S); + //modetbar->AddRadioTool(MODE_P, _T("Extend"), wxBITMAP(p_), wxNullBitmap, _T(""), TIPS_P); + //modetbar->AddRadioTool(MODE_C, _T("Close"), wxBITMAP(c_), wxNullBitmap, _T(""), TIPS_C); + modetbar->AddRadioTool(MODE_DEL, _T("Delete"), wxBITMAP(del_), wxNullBitmap, _T(""), TIPS_DEL); + modetbar->AddRadioTool(MODE_SCALEROTATE, _T("Scale/Rotate"), wxBITMAP(sc_rot_), wxNullBitmap, _T(""), TIPS_SCALEROTATE); + modetbar->AddRadioTool(MODE_NUT_BILINEAR, _T("Bilinear"), wxBITMAP(nut_), wxNullBitmap, _T(""), TIPS_NUTB); + //modetbar->AddRadioTool(MODE_NUT_PERSPECTIVE, _T("NUT:P"), wxBITMAP(arr_), wxNullBitmap, _T(""), _T("")); + modetbar->Realize(); + + m_mgr.AddPane(modetbar, wxAuiPaneInfo().Name(_T("modetbar")).Caption(TBNAME_MODE). + ToolbarPane().Top().Position(1).Dockable(true).LeftDockable(false).RightDockable(false)); + + bgimgtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL); + bgimgtbar->SetToolBitmapSize(wxSize(24,15)); + bgimgtbar->AddCheckTool(DRAG_DWG, _T("Pan drawing"), wxBITMAP(pan_shp), wxNullBitmap, _T(""), TIPS_DWG); + bgimgtbar->AddCheckTool(DRAG_BGIMG, _T("Pan background"), wxBITMAP(pan_bg), wxNullBitmap, _T(""), TIPS_BGIMG); + //bgimgtbar->AddRadioTool(DRAG_BOTH, _T("Pan both"), wxBITMAP(pan_both), wxNullBitmap, _T(""), TIPS_BOTH); + bgimgtbar->Realize(); + + m_mgr.AddPane(bgimgtbar, wxAuiPaneInfo().Name(_T("bgimgtbar")).Caption(TBNAME_BGIMG). + ToolbarPane().Top().Position(2).Dockable(true).LeftDockable(false).RightDockable(false)); + +} + +void ASSDrawFrame::SetMenus() +{ + drawMenu = new wxMenu; + drawMenu->Append(MENU_CLEAR, _T("&Clear\tCtrl+N"), TIPS_CLEAR); + //drawMenu->Append(MENU_EDITSRC, _T("&Source"), TIPS_EDITSRC); + drawMenu->Append(MENU_PREVIEW, _T("&Preview\tCtrl+P"), TIPS_PREVIEW, wxITEM_CHECK); + drawMenu->Append(MENU_TRANSFORM, _T("&Transform"), TIPS_TRANSFORM); + drawMenu->Append(MENU_PASTE, _T("&Paste\tCtrl+V"), TIPS_PASTE); + drawMenu->AppendSeparator(); + drawMenu->Append(MENU_UNDO, _T("&Undo\tCtrl+Z"), TIPS_UNDO); + drawMenu->Append(MENU_REDO, _T("&Redo\tCtrl+Y"), TIPS_REDO); + drawMenu->Enable(MENU_UNDO, false); + drawMenu->Enable(MENU_REDO, false); + + modeMenu = new wxMenu; + modeMenu->Append(MODE_ARR, _T("D&rag\tF1"), TIPS_ARR, wxITEM_RADIO); + modeMenu->Append(MODE_M, _T("Draw &M\tF2"), TIPS_M, wxITEM_RADIO); + modeMenu->Append(MODE_L, _T("Draw &L\tF3"), TIPS_L, wxITEM_RADIO); + modeMenu->Append(MODE_B, _T("Draw &B\tF4"), TIPS_B, wxITEM_RADIO); + modeMenu->Append(MODE_DEL, _T("&Delete\tF5"), TIPS_DEL, wxITEM_RADIO); + modeMenu->Append(MODE_SCALEROTATE, _T("&Scale/Rotate\tF6"), TIPS_NUTB, wxITEM_RADIO); + modeMenu->Append(MODE_NUT_BILINEAR, _T("&Bilinear transformation\tF7"), TIPS_SCALEROTATE, wxITEM_RADIO); + + bgimgMenu = new wxMenu; + bgimgMenu->Append(DRAG_DWG, _T("Pan/Zoom &Drawing\tShift+F1"), TIPS_DWG, wxITEM_CHECK); + bgimgMenu->Append(DRAG_BGIMG, _T("Pan/Zoom Back&ground\tShift+F2"), TIPS_BGIMG, wxITEM_CHECK); + bgimgMenu->AppendSeparator(); + bgimgMenu->Append(MENU_BGIMG_ALPHA, _T("Set background image opacity"), _T("")); + wxMenu* reposbgMenu = new wxMenu; + reposbgMenu->Append( MENU_REPOS_BGTOPLEFT, _T("Top left\tCtrl+Shift+7") ); + reposbgMenu->Append( MENU_REPOS_BGTOPRIGHT, _T("Top right\tCtrl+Shift+9") ); + reposbgMenu->Append( MENU_REPOS_BGCENTER, _T("&Center\tCtrl+Shift+5") ); + reposbgMenu->Append( MENU_REPOS_BGBOTLEFT, _T("Bottom left\tCtrl+Shift+1") ); + reposbgMenu->Append( MENU_REPOS_BGBOTRIGHT, _T("Bottom right\tCtrl+Shift+3") ); + bgimgMenu->Append(MENU_BGIMG_RECENTER, _T("Reposition [&0, 0]"), reposbgMenu); + bgimgMenu->Append(MENU_BGIMG_REMOVE, _T("Remove background\tShift+Del"), _T("")); + + wxMenu* reposMenu = new wxMenu; + reposMenu->Append( MENU_REPOS_TOPLEFT, _T("Top left\tCtrl+7") ); + reposMenu->Append( MENU_REPOS_TOPRIGHT, _T("Top right\tCtrl+9") ); + reposMenu->Append( MENU_REPOS_CENTER, _T("&Center\tCtrl+5") ); + reposMenu->Append( MENU_REPOS_BOTLEFT, _T("Bottom left\tCtrl+1") ); + reposMenu->Append( MENU_REPOS_BOTRIGHT, _T("Bottom right\tCtrl+3") ); + + tbarMenu = new wxMenu; + tbarMenu->AppendCheckItem(MENU_TB_DRAW, TBNAME_DRAW); + tbarMenu->AppendCheckItem(MENU_TB_MODE, TBNAME_MODE); + tbarMenu->AppendCheckItem(MENU_TB_BGIMG, TBNAME_BGIMG); + tbarMenu->AppendSeparator(); + tbarMenu->Append(MENU_TB_ALL, _T("Show all")); + tbarMenu->Append(MENU_TB_NONE, _T("Hide all")); + tbarMenu->Append(MENU_TB_DOCK, _T("Dock all")); + tbarMenu->Append(MENU_TB_UNDOCK, _T("Undock all")); + + viewMenu = new wxMenu; + viewMenu->Append(MENU_LIBRARY, _T("&Library"), TIPS_LIBRARY, wxITEM_CHECK); + if (settingsdlg) + viewMenu->Append(MENU_SETTINGS, _T("&Settings"), _T(""), wxITEM_CHECK); + viewMenu->Append(MENU_TBAR, _T("&Toolbars"), tbarMenu); + viewMenu->Append(MENU_RECENTER, _T("Reposition [&0, 0]"), reposMenu); + viewMenu->AppendSeparator(); + viewMenu->Append(MENU_RESETPERSPECTIVE, _T("&Reset workspace")); + + wxMenu* helpMenu = new wxMenu; + helpMenu->Append(MENU_HELP, _T("&Manual")); + helpMenu->Append(wxID_ABOUT, _T("&About")); + + wxMenuBar *menuBar = new wxMenuBar(); + menuBar->Append(drawMenu, _T("&Canvas")); + menuBar->Append(modeMenu, _T("&Mode")); + menuBar->Append(bgimgMenu, _T("&Background")); + menuBar->Append(viewMenu, _T("&Workspace")); + menuBar->Append(helpMenu, _T("&Help")); + + + SetMenuBar(menuBar); +} + +void ASSDrawFrame::SetPanes() +{ + m_mgr.AddPane(shapelib, wxAuiPaneInfo().Name(_T("library")).Caption(_T("Shapes Library")). + Right().Layer(2).Position(0).CloseButton(true).BestSize(wxSize(120, 480)).MinSize(wxSize(100, 200))); + + m_mgr.AddPane(m_canvas, wxAuiPaneInfo().Name(_T("canvas")).CenterPane()); + + m_mgr.AddPane(srctxtctrl, wxAuiPaneInfo().Name(_T("commands")).Caption(_T("Drawing commands")). + Bottom().Layer(1).CloseButton(false).BestSize(wxSize(320, 48))); + + if (settingsdlg) + m_mgr.AddPane(settingsdlg, wxAuiPaneInfo().Name(_T("settings")).Caption(_T("Settings")). + Right().Layer(3).Position(0).CloseButton(true).BestSize(wxSize(240, 480)).MinSize(wxSize(200, 200)).Show(false)); +} + +ASSDrawFrame::~ASSDrawFrame() +{ + config->SetPath(_T("info")); + config->Write(_T("assdraw3.exe"), wxStandardPaths::Get().GetExecutablePath()); + config->Write(_T("version"), VERSION); + config->SetPath(_T("..")); + + SaveSettings(); + + config->SetPath(_T("perspective")); + config->Write(_T("perspective"), m_mgr.SavePerspective()); + config->SetPath(_T("..")); + + config->DeleteGroup(_T("library")); + config->SetPath(_T("library")); + typedef std::vector< ASSDrawShapePreview *> PrevVec; + PrevVec shapes = shapelib->GetShapePreviews(); + int n = shapes.size(); + config->Write(_T("n"), n); + for (int i = 0; i < n; i++) + config->Write(wxString::Format(_T("%d"),i), shapes[i]->GenerateASS()); + config->SetPath(_T("..")); + + wxFileOutputStream cfgf(configfile); + config->Save(cfgf); + delete config; + + if (settingsdlg) settingsdlg->Destroy(); // we need this since wxPropertyGrid must be Clear()ed before deleting + + m_mgr.UnInit(); +} + +void ASSDrawFrame::_Clear() +{ + wxMessageDialog msgb(this, _T("Clear the canvas and create a new drawing?"), + _T("Confirmation"), wxOK | wxCANCEL | wxICON_QUESTION ); + if (msgb.ShowModal() == wxID_OK) + { + m_canvas->RefreshUndocmds(); + m_canvas->AddUndo(_T("Clear canvas")); + m_canvas->ResetEngine(true); + wxSize siz = m_canvas->GetClientSize(); + m_canvas->ChangeZoomLevelTo(DEFAULT_SCALE, wxPoint(siz.x / 2, siz.y / 2)); + m_canvas->MoveCanvasOriginTo(siz.x / 2, siz.y / 2); + UpdateUndoRedoMenu(); + m_canvas->RefreshDisplay(); + } +} + +void ASSDrawFrame::_Preview() +{ + m_canvas->SetPreviewMode( !m_canvas->IsPreviewMode() ); + UpdateFrameUI(); + m_canvas->RefreshDisplay(); +} + +void ASSDrawFrame::_ToggleLibrary() +{ + m_mgr.GetPane(shapelib).Show(!m_mgr.GetPane(shapelib).IsShown()); + m_mgr.Update(); + UpdateFrameUI(); +} + +void ASSDrawFrame::_ToggleSettings() +{ + if (settingsdlg == NULL) return; + m_mgr.GetPane(settingsdlg).Show(!m_mgr.GetPane(settingsdlg).IsShown()); + m_mgr.Update(); + UpdateFrameUI(); +} + +void ASSDrawFrame::_ResetPerspective() +{ + m_mgr.LoadPerspective(default_perspective, false); + UpdateFrameUI(); + m_mgr.Update(); + DRAGMODE bck = m_canvas->GetDragMode(); + if (m_canvas->HasBackgroundImage()) m_canvas->SetDragMode(DRAGMODE(true, true)); + wxSize clientsize = m_canvas->GetClientSize(); + m_canvas->ChangeZoomLevelTo(DEFAULT_SCALE, wxPoint(clientsize.x / 2, clientsize.y / 2)); + m_canvas->MoveCanvasOriginTo(clientsize.x / 2, clientsize.y / 2); + m_canvas->SetDragMode(bck); + UpdateFrameUI(); +} + +void ASSDrawFrame::_Transform() +{ + if (transformdlg == NULL) + transformdlg = new ASSDrawTransformDlg( this ); + + if (transformdlg->ShowModal() == wxID_OK) + { + m_canvas->Transform( + transformdlg->xformvals.f1, + transformdlg->xformvals.f2, + transformdlg->xformvals.f3, + transformdlg->xformvals.f4, + transformdlg->xformvals.f5, + transformdlg->xformvals.f6, + transformdlg->xformvals.f7, + transformdlg->xformvals.f8 ); + m_canvas->AddUndo(_T("Transform")); + m_canvas->RefreshDisplay(); + UpdateUndoRedoMenu(); + } +} + +void ASSDrawFrame::_Paste() +{ + if (wxTheClipboard->Open()) + { + if (wxTheClipboard->IsSupported( wxDF_BITMAP )) + { + wxBitmapDataObject data; + wxTheClipboard->GetData( data ); + m_canvas->SetBackgroundImage( data.GetBitmap().ConvertToImage() ); + //m_canvas->AskUserForBackgroundAlpha(); + } + else if (wxTheClipboard->IsSupported( wxDF_TEXT )) + { + wxTextDataObject data; + wxTheClipboard->GetData( data ); + UpdateASSCommandStringToSrcTxtCtrl( data.GetText() ); + } + wxTheClipboard->Close(); + } +} + +void ASSDrawFrame::OnChoose_Recenter(wxCommandEvent& event) +{ + int x = 0, y = 0; + wxSize f = m_canvas->GetClientSize(); + + switch (event.GetId()) + { + case MENU_REPOS_TOPLEFT: x = 0, y = 0; break; + case MENU_REPOS_TOPRIGHT: x = f.x, y = 0; break; + case MENU_REPOS_CENTER: x = f.x / 2, y = f.y / 2; break; + case MENU_REPOS_BOTLEFT: x = 0, y = f.y; break; + case MENU_REPOS_BOTRIGHT: x = f.x, y = f.y; break; + } + + m_canvas->MoveCanvasOriginTo(x, y); + m_canvas->RefreshDisplay(); +} + +void ASSDrawFrame::OnChoose_RecenterToBG(wxCommandEvent& event) +{ + unsigned w, h; + wxRealPoint disp; + double scale; + if (m_canvas->GetBackgroundInfo(w, h, disp, scale)) + { + int x = 0, y = 0; + int lx = (int)disp.x, ty = (int)disp.y; + int rx = lx + (int)(w * scale); + int by = ty + (int)(h * scale); + + switch (event.GetId()) + { + case MENU_REPOS_BGTOPLEFT: x = lx, y = ty; break; + case MENU_REPOS_BGTOPRIGHT: x = rx, y = ty; break; + case MENU_REPOS_BGCENTER: x = (rx + lx) / 2, y = (by + ty) / 2; break; + case MENU_REPOS_BGBOTLEFT: x = lx, y = by; break; + case MENU_REPOS_BGBOTRIGHT: x = rx, y = by; break; + } + + m_canvas->MoveCanvasDrawing(x - m_canvas->GetOriginX(), y - m_canvas->GetOriginY()); + m_canvas->RefreshDisplay(); + } +} + +void ASSDrawFrame::_Help() +{ + helpcontroller.DisplayContents(); +} + +void ASSDrawFrame::_About(unsigned timeout) +{ + ASSDrawAboutDlg *aboutdlg = new ASSDrawAboutDlg( this, timeout ); + aboutdlg->ShowModal(); + aboutdlg->Destroy(); +} + +void ASSDrawFrame::OnChoose_Mode(wxCommandEvent& event) +{ + m_canvas->SetDrawMode( (MODE) event.GetId() ); + UpdateFrameUI(); +} + +void ASSDrawFrame::OnChoose_DragMode(wxCommandEvent& event) +{ + DRAGMODE dm = m_canvas->GetDragMode(); + switch (event.GetId()) + { + case DRAG_DWG: dm.drawing = !dm.drawing; break; + case DRAG_BGIMG: dm.bgimg = !dm.bgimg; break; + } + m_canvas->SetDragMode( dm ); + UpdateFrameUI(); +} + +void ASSDrawFrame::OnZoomSliderChanged(wxScrollEvent &event) +{ + double zoom = (double) event.GetPosition() / 100.0; + m_canvas->ChangeZoomLevelTo(zoom, wxPoint((int) m_canvas->GetOriginX(), (int) m_canvas->GetOriginY())); +} + +void ASSDrawFrame::OnToolRClick(wxCommandEvent& event) +{ + int id = event.GetId(); + if (drawtbar->FindById(id) != NULL + || modetbar->FindById(id) != NULL + || bgimgtbar->FindById(id) != NULL) + { + PopupMenu(tbarMenu); + } +} + +void ASSDrawFrame::OnChoose_TBarRClickMenu(wxCommandEvent& event) +{ + int id = event.GetId(); + wxToolBar* tbar[3] = { drawtbar, modetbar, bgimgtbar }; + bool tb[3] = { false, false, false }; + bool show[2] = { false, true }; + bool dock[2] = { false, true }; + switch (id) + { + case MENU_TB_ALL: + tb[0] = true, tb[1] = true, tb[2] = true; + show[0] = true, show[1] = true; + break; + case MENU_TB_NONE: + tb[0] = true, tb[1] = true, tb[2] = true; + show[0] = true, show[1] = false; + break; + case MENU_TB_DOCK: + tb[0] = true, tb[1] = true, tb[2] = true; + dock[0] = true, dock[1] = true; + break; + case MENU_TB_UNDOCK: + tb[0] = true, tb[1] = true, tb[2] = true; + dock[0] = true, dock[1] = false; + break; + case MENU_TB_DRAW: + tb[0] = true; + show[0] = true, show[1] = !m_mgr.GetPane(tbar[0]).IsShown(); + break; + case MENU_TB_MODE: + tb[1] = true; + show[0] = true, show[1] = !m_mgr.GetPane(tbar[1]).IsShown(); + break; + case MENU_TB_BGIMG: + tb[2] = true; + show[0] = true, show[1] = !m_mgr.GetPane(tbar[2]).IsShown(); + break; + } + for (int i = 0; i < 3; i++) + { + if (tb[i]) + { + if (show[0]) + m_mgr.GetPane(tbar[i]).Show(show[1]); + if (dock[0]) + if (dock[1]) + m_mgr.GetPane(tbar[i]).Dock(); + else + m_mgr.GetPane(tbar[i]).Float(); + } + } + m_mgr.Update(); + UpdateFrameUI(); +} + +void ASSDrawFrame::UpdateASSCommandStringFromSrcTxtCtrl(wxString cmds) +{ + m_canvas->ParseASS(cmds, true); + m_canvas->RefreshDisplay(); +} + +void ASSDrawFrame::UpdateASSCommandStringToSrcTxtCtrl(wxString cmd) +{ + if (behaviors.capitalizecmds) + cmd.UpperCase(); + else + cmd.LowerCase(); + srctxtctrl->ChangeValue(cmd); + //srctxtctrl->AppendText(cmd); +} + +void ASSDrawFrame::UndoOrRedo(bool isundo) +{ + if (isundo) + m_canvas->Undo(); + else + m_canvas->Redo(); + UpdateUndoRedoMenu(); + UpdateFrameUI(); +} + +void ASSDrawFrame::UpdateUndoRedoMenu() +{ + wxString nextUndo = m_canvas->GetTopUndo(); + if (nextUndo.IsSameAs(_T(""))) + { + drawMenu->SetLabel(MENU_UNDO, _T("Undo\tCtrl+Z")); + drawMenu->Enable(MENU_UNDO, false); + } + else + { + drawMenu->SetLabel(MENU_UNDO, wxString::Format(_T("Undo: %s\tCtrl+Z"), nextUndo.c_str())); + drawMenu->Enable(MENU_UNDO, true); + } + wxString nextRedo = m_canvas->GetTopRedo(); + if (nextRedo.IsSameAs(_T(""))) + { + drawMenu->SetLabel(MENU_REDO, _T("Redo\tCtrl+Y")); + drawMenu->Enable(MENU_REDO, false); + } + else + { + drawMenu->SetLabel(MENU_REDO, wxString::Format(_T("Redo: %s\tCtrl+Y"), nextRedo.c_str())); + drawMenu->Enable(MENU_REDO, true); + } +} + +void ASSDrawFrame::UpdateFrameUI(unsigned level) +{ + bool hasbg = m_canvas->HasBackgroundImage(); + int zoom = (int) ((m_canvas->GetScale() * 100.0)+0.5); + switch (level) + { + case 0: // all + drawtbar->ToggleTool(TB_PREVIEW, m_canvas->IsPreviewMode()); + modetbar->ToggleTool(m_canvas->GetDrawMode(), true); + drawMenu->Check(MENU_PREVIEW, m_canvas->IsPreviewMode()); + modeMenu->Check(m_canvas->GetDrawMode(), true); + case 2: // bgimg & toolbars + bgimgtbar->ToggleTool(DRAG_DWG, m_canvas->GetDragMode().drawing); + bgimgtbar->ToggleTool(DRAG_BGIMG, m_canvas->GetDragMode().bgimg); + bgimgtbar->EnableTool(DRAG_BGIMG, hasbg); + m_mgr.Update(); + viewMenu->Check(MENU_LIBRARY, m_mgr.GetPane(shapelib).IsShown()); + if (settingsdlg) + viewMenu->Check(MENU_SETTINGS, m_mgr.GetPane(settingsdlg).IsShown()); + bgimgMenu->Check(DRAG_DWG, m_canvas->GetDragMode().drawing); + bgimgMenu->Check(DRAG_BGIMG, m_canvas->GetDragMode().bgimg); + bgimgMenu->Enable(DRAG_BGIMG, hasbg); + bgimgMenu->Enable(MENU_BGIMG_ALPHA, hasbg); + bgimgMenu->Enable(MENU_BGIMG_RECENTER, hasbg); + bgimgMenu->Enable(MENU_BGIMG_REMOVE, hasbg); + tbarMenu->Check(MENU_TB_DRAW, m_mgr.GetPane(drawtbar).IsShown()); + tbarMenu->Check(MENU_TB_MODE, m_mgr.GetPane(modetbar).IsShown()); + tbarMenu->Check(MENU_TB_BGIMG, m_mgr.GetPane(bgimgtbar).IsShown()); + case 3: // zoom slider + zoomslider->SetValue(zoom); + SetStatusText( wxString::Format(_T("%d%%"), zoom), 2 ); + zoomslider->Enable(m_canvas->GetDragMode().drawing && m_canvas->CanZoom()); + } +} + +void ASSDrawFrame::OnClose(wxCloseEvent &event) +{ + if (event.CanVeto() && behaviors.confirmquit) + { + if (wxMessageDialog(this, _T("Do you want to close ASSDraw3 now?"), _T("Confirmation"), wxOK | wxCANCEL).ShowModal() == wxID_OK) + Destroy(); + else + event.Veto(); + } + else + Destroy(); +} diff --git a/assdraw/src/assdraw.hpp b/assdraw/src/assdraw.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1ebd4dc4f2a97683ca99572a5b3b48b4d96e8fb1 --- /dev/null +++ b/assdraw/src/assdraw.hpp @@ -0,0 +1,209 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: assdraw.hpp +// Purpose: header file for ASSDraw main source file; also includes +// declarations for all GUI elements (except wxRuler, which has +// its own header file) +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "_common.hpp" + +#include <vector> +#include <wx/wxprec.h> +#include <wx/aui/aui.h> +#include <wx/fileconf.h> +#include <wx/help.h> + +#include "canvas.hpp" // the canvas +#include "dlgctrl.hpp" // custom dialogs & controls +#include "settings.hpp" // settings property grid +#include "library.hpp" // shape library + +//#define BETAVERSION 2 +#define VERSION _T("3.0 final") + +// this header file declares the following classes +class ASSDrawApp; +class ASSDrawFrame; +class ASSDrawCanvas; + +class ASSDrawApp : public wxApp +{ +public: + bool OnInit(); +}; + +class ASSDrawFrame : public wxFrame +{ +public: + // constructor + ASSDrawFrame(wxApp *app, const wxString& title, const wxPoint& pos, const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE); + virtual ~ASSDrawFrame(); + + // event handlers (these functions should _not_ be virtual) + // OnSelect_* for single items, OnChoose_* for many-choose-one items + void OnSelect_Clear(wxCommandEvent& WXUNUSED(event)) { _Clear(); } + void OnSelect_Preview(wxCommandEvent& WXUNUSED(event)) { _Preview(); } + void OnSelect_Transform(wxCommandEvent& WXUNUSED(event)) { _Transform(); } + void OnSelect_Library(wxCommandEvent& WXUNUSED(event)) { _ToggleLibrary(); } + void OnSelect_Settings(wxCommandEvent& WXUNUSED(event)) { _ToggleSettings(); } + void OnSelect_ResetPerspective(wxCommandEvent& WXUNUSED(event)) { _ResetPerspective(); } + void OnSelect_Help(wxCommandEvent& WXUNUSED(event)) { _Help(); } + void OnSelect_About(wxCommandEvent& WXUNUSED(event)) { _About(); } + void OnSelect_Undo(wxCommandEvent& WXUNUSED(event)) { UndoOrRedo( true ); } + void OnSelect_Redo(wxCommandEvent& WXUNUSED(event)) { UndoOrRedo( false ); } + void OnSelect_Paste(wxCommandEvent& WXUNUSED(event)) { _Paste(); } + void OnSelect_RemoveBG(wxCommandEvent& WXUNUSED(event)) { m_canvas->RemoveBackgroundImage(); } + void OnSelect_AlphaBG(wxCommandEvent& WXUNUSED(event)) { m_canvas->AskUserForBackgroundAlpha(); } + void OnChoose_Recenter(wxCommandEvent& event); + void OnChoose_RecenterToBG(wxCommandEvent& event); + void OnChoose_Mode(wxCommandEvent& event); + void OnChoose_DragMode(wxCommandEvent& event); + void OnZoomSliderChanged(wxScrollEvent &event); + void OnToolRClick(wxCommandEvent& event); + void OnChoose_TBarRClickMenu(wxCommandEvent& event); + void OnSettingsChanged(wxCommandEvent& event); + void OnClose(wxCloseEvent &event); + + void UpdateASSCommandStringToSrcTxtCtrl(wxString cmds); + void UpdateASSCommandStringFromSrcTxtCtrl(wxString cmds); + + void UndoOrRedo(bool isundo); + void UpdateUndoRedoMenu(); + + void _Clear(); + void _Preview(); + void _Transform(); + void _ToggleLibrary(); + void _ToggleSettings(); + void _Help(); + void _About(unsigned timeout = 0); + void _Paste(); + void _ResetPerspective(); + + void UpdateFrameUI(unsigned level = 0); + + // the canvas + wxApp *m_app; + ASSDrawCanvas* m_canvas; + wxAuiManager m_mgr; + wxString default_perspective; + ASSDrawSrcTxtCtrl* srctxtctrl; + + // config + wxString configfile; + wxFileConfig *config; + + // toolbars + wxToolBar *drawtbar, *modetbar, *bgimgtbar; + + // zoom slider + wxSlider* zoomslider; + + //library + ASSDrawShapeLibrary *shapelib; + typedef std::vector< ASSDrawEngine* > DrawEngineVec; + DrawEngineVec libshapes; + + // menus +#if wxUSE_MENUS + wxMenu *drawMenu; + wxMenu *modeMenu; + wxMenu *bgimgMenu; + wxMenu *viewMenu; + wxMenu *tbarMenu; +#endif + + // dialogs + ASSDrawTransformDlg* transformdlg; + ASSDrawSettingsDialog* settingsdlg; + + // colors + struct + { + wxColour canvas_bg; + wxColour canvas_shape_normal; + wxColour canvas_shape_preview; + wxColour canvas_shape_outline; + wxColour canvas_shape_guideline; + wxColour canvas_shape_mainpoint; + wxColour canvas_shape_controlpoint; + wxColour canvas_shape_selectpoint; + wxColour library_shape; + wxColour library_libarea; + wxColour origin, ruler_h, ruler_v; + } colors; + + struct + { + long canvas_shape_normal; + long canvas_shape_preview; + long canvas_shape_outline; + long canvas_shape_guideline; + long canvas_shape_mainpoint; + long canvas_shape_controlpoint; + long canvas_shape_selectpoint; + } alphas; + + struct + { + long origincross; + } sizes; + + struct + { + bool capitalizecmds; + bool autoaskimgopac; + bool parse_spc; + bool nosplashscreen; + bool confirmquit; + } behaviors; + + void LoadSettings(); + void SaveSettings(); + void InitializeDefaultSettings(); + void ApplySettings(); + static void wxColourToAggRGBA(wxColour &colour, agg::rgba &rgba); + static void wxColourSetAlpha(wxColour &colour, long alpha); + +protected: + virtual void SetToolBars(); + virtual void SetMenus(); + virtual void SetPanes(); + DECLARE_EVENT_TABLE() + + wxHelpController helpcontroller; + +}; diff --git a/assdraw/src/assdraw.rc b/assdraw/src/assdraw.rc new file mode 100644 index 0000000000000000000000000000000000000000..162d9bd919158e93b043640f446f4b25e06c9909 --- /dev/null +++ b/assdraw/src/assdraw.rc @@ -0,0 +1,101 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +APPICO ICON "tsukasa.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +ASSDRAW3_ BITMAP "bitmaps/assdraw3.bmp" +NEW_ BITMAP "bitmaps/new_.bmp" +SRC_ BITMAP "bitmaps/src_.bmp" +PREVIEW_ BITMAP "bitmaps/preview_.bmp" +ARR_ BITMAP "bitmaps/arr_.bmp" +M_ BITMAP "bitmaps/m_.bmp" +N_ BITMAP "bitmaps/n_.bmp" +L_ BITMAP "bitmaps/l_.bmp" +B_ BITMAP "bitmaps/b_.bmp" +S_ BITMAP "bitmaps/s_.bmp" +P_ BITMAP "bitmaps/p_.bmp" +C_ BITMAP "bitmaps/c_.bmp" +DEL_ BITMAP "bitmaps/del_.bmp" +NUT_ BITMAP "bitmaps/nut_.bmp" +SC_ROT_ BITMAP "bitmaps/sc_rot_.bmp" +ROT_ BITMAP "bitmaps/rot_.bmp" +HELP_ BITMAP "bitmaps/help_.bmp" +TRANSFORM BITMAP "bitmaps/transform.bmp" +PAN_SHP BITMAP "bitmaps/pan_shp.bmp" +PAN_BG BITMAP "bitmaps/pan_bg.bmp" +//PAN_BOTH BITMAP "bitmaps/pan_both.bmp" +ADD BITMAP "bitmaps/add_.bmp" +CHECK BITMAP "bitmaps/check_.bmp" +UNCHECK BITMAP "bitmaps/uncheck_.bmp" +DELCROSS BITMAP "bitmaps/del_cross.bmp" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/assdraw/src/assdraw_settings.cpp b/assdraw/src/assdraw_settings.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d774f55c1e31da3d6123bb1c4c1ad270786ece52 --- /dev/null +++ b/assdraw/src/assdraw_settings.cpp @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +#include "assdraw.hpp" + +void ASSDrawFrame::InitializeDefaultSettings() +{ + colors.canvas_bg = wxColour(0xFF, 0xFF, 0xFF); + colors.canvas_shape_normal = wxColour(0x0, 0x0, 0xFF, 0x99); + colors.canvas_shape_preview = wxColour(0x0, 0x0, 0xFF); + colors.canvas_shape_outline = wxColour(0x0, 0x0, 0x0); + colors.canvas_shape_guideline = wxColour(0x66, 0x66, 0x66); + colors.canvas_shape_mainpoint = wxColour(0xFF, 0x0, 0x0, 0xCC); + colors.canvas_shape_controlpoint = wxColour(0x0, 0xFF, 0x0, 0xCC); + colors.canvas_shape_selectpoint = wxColour(0x0, 0x0, 0xCC); + colors.library_shape = wxColour(0x0, 0x66, 0x99); + colors.library_libarea = wxColour(0xFF, 0xFF, 0x99); + colors.origin = wxColour(0xFF, 0x0, 0x0); + colors.ruler_h = wxColour(0x0, 0x0, 0x66); + colors.ruler_v = wxColour(0x66, 0x0, 0x0); + + alphas.canvas_shape_normal = 128; + alphas.canvas_shape_preview = 255; + alphas.canvas_shape_outline = 255; + alphas.canvas_shape_guideline = 255; + alphas.canvas_shape_mainpoint = 128; + alphas.canvas_shape_controlpoint = 128; + alphas.canvas_shape_selectpoint = 255; + + sizes.origincross = 2; + + behaviors.capitalizecmds = false; + behaviors.autoaskimgopac = true; + behaviors.parse_spc = false; + behaviors.nosplashscreen = false; + behaviors.confirmquit = true; +} + +void ASSDrawFrame::ApplySettings() +{ + wxColourSetAlpha(colors.canvas_shape_normal, alphas.canvas_shape_normal); + wxColourSetAlpha(colors.canvas_shape_preview, alphas.canvas_shape_preview); + wxColourSetAlpha(colors.canvas_shape_outline, alphas.canvas_shape_outline); + wxColourSetAlpha(colors.canvas_shape_guideline, alphas.canvas_shape_guideline); + wxColourSetAlpha(colors.canvas_shape_mainpoint, alphas.canvas_shape_mainpoint); + wxColourSetAlpha(colors.canvas_shape_controlpoint, alphas.canvas_shape_controlpoint); + wxColourSetAlpha(colors.canvas_shape_selectpoint, alphas.canvas_shape_selectpoint); + + wxColourToAggRGBA(colors.canvas_shape_normal, m_canvas->rgba_shape_normal); + wxColourToAggRGBA(colors.canvas_shape_preview, m_canvas->rgba_shape); + wxColourToAggRGBA(colors.canvas_shape_outline, m_canvas->rgba_outline); + wxColourToAggRGBA(colors.canvas_shape_guideline, m_canvas->rgba_guideline); + wxColourToAggRGBA(colors.canvas_shape_mainpoint, m_canvas->rgba_mainpoint); + wxColourToAggRGBA(colors.canvas_shape_controlpoint, m_canvas->rgba_controlpoint); + wxColourToAggRGBA(colors.canvas_shape_selectpoint, m_canvas->rgba_selectpoint); + wxColourToAggRGBA(colors.origin, m_canvas->rgba_origin); + wxColourToAggRGBA(colors.ruler_h, m_canvas->rgba_ruler_h); + wxColourToAggRGBA(colors.ruler_v, m_canvas->rgba_ruler_v); + + m_canvas->color_bg.r = colors.canvas_bg.Red(); + m_canvas->color_bg.g = colors.canvas_bg.Green(); + m_canvas->color_bg.b = colors.canvas_bg.Blue(); + m_canvas->color_bg.a = colors.canvas_bg.Alpha(); + m_canvas->PrepareBackgroundBitmap(-1.0); + m_canvas->Refresh(); + + shapelib->libarea->SetBackgroundColour(colors.library_libarea); + typedef std::vector< ASSDrawShapePreview *> PrevVec; + PrevVec shapes = shapelib->GetShapePreviews(); + int n = shapes.size(); + for (int i = 0; i < n; i++) + wxColourToAggRGBA(colors.library_shape, shapes[i]->rgba_shape); + shapelib->libarea->Refresh(); + + m_canvas->SetDrawCmdSet(behaviors.parse_spc? _T("m n l b s p c _"):_T("m n l b _")); + + UpdateASSCommandStringToSrcTxtCtrl(m_canvas->GenerateASS()); +} + +void ASSDrawFrame::wxColourToAggRGBA(wxColour &colour, agg::rgba &rgba) +{ + rgba.r = (double) colour.Red() / 255.0; + rgba.g = (double) colour.Green() / 255.0; + rgba.b = (double) colour.Blue() / 255.0; + rgba.a = (double) colour.Alpha() / 255.0; +} + +void ASSDrawFrame::wxColourSetAlpha(wxColour &colour, long alpha) +{ + colour.Set(colour.Red(), colour.Green(), colour.Blue(), alpha); +} + +void ASSDrawFrame::OnSettingsChanged(wxCommandEvent& event) +{ + ApplySettings(); +} + +void ASSDrawFrame::LoadSettings() +{ + #define CFGREADCOLOR(color) if (config->Read(wxString(#color,wxConvUTF8), &tmpstr)) color.Set(tmpstr); + #define CFGREAD(var) config->Read(wxString(#var,wxConvUTF8), &var); + config->SetPath(_T("settings")); + wxString tmpstr; + CFGREADCOLOR(colors.canvas_bg) + CFGREADCOLOR(colors.canvas_shape_normal) + CFGREADCOLOR(colors.canvas_shape_preview) + CFGREADCOLOR(colors.canvas_shape_controlpoint) + CFGREADCOLOR(colors.canvas_shape_guideline) + CFGREADCOLOR(colors.canvas_shape_mainpoint) + CFGREADCOLOR(colors.canvas_shape_outline) + CFGREADCOLOR(colors.canvas_shape_selectpoint) + CFGREADCOLOR(colors.library_libarea) + CFGREADCOLOR(colors.library_shape) + CFGREADCOLOR(colors.origin) + CFGREADCOLOR(colors.ruler_h) + CFGREADCOLOR(colors.ruler_v) + CFGREAD(alphas.canvas_shape_normal) + CFGREAD(alphas.canvas_shape_preview) + CFGREAD(alphas.canvas_shape_controlpoint) + CFGREAD(alphas.canvas_shape_guideline) + CFGREAD(alphas.canvas_shape_mainpoint) + CFGREAD(alphas.canvas_shape_outline) + CFGREAD(alphas.canvas_shape_selectpoint) + CFGREAD(sizes.origincross) + CFGREAD(behaviors.autoaskimgopac) + CFGREAD(behaviors.capitalizecmds) + CFGREAD(behaviors.parse_spc) + CFGREAD(behaviors.nosplashscreen) + CFGREAD(behaviors.confirmquit) + config->SetPath(_T("..")); +} + +void ASSDrawFrame::SaveSettings() +{ + #define CFGWRITE(var) config->Write(wxString(#var,wxConvUTF8), var); + #define CFGWRITECOLOR(color) config->Write(wxString(#color,wxConvUTF8), color.GetAsString(wxC2S_CSS_SYNTAX)); + config->SetPath(_T("settings")); + CFGWRITECOLOR(colors.canvas_bg) + CFGWRITECOLOR(colors.canvas_shape_normal) + CFGWRITECOLOR(colors.canvas_shape_preview) + CFGWRITECOLOR(colors.canvas_shape_controlpoint) + CFGWRITECOLOR(colors.canvas_shape_guideline) + CFGWRITECOLOR(colors.canvas_shape_mainpoint) + CFGWRITECOLOR(colors.canvas_shape_outline) + CFGWRITECOLOR(colors.canvas_shape_selectpoint) + CFGWRITECOLOR(colors.library_libarea) + CFGWRITECOLOR(colors.library_shape) + CFGWRITECOLOR(colors.origin) + CFGWRITECOLOR(colors.ruler_h) + CFGWRITECOLOR(colors.ruler_v) + CFGWRITE(alphas.canvas_shape_normal) + CFGWRITE(alphas.canvas_shape_preview) + CFGWRITE(alphas.canvas_shape_controlpoint) + CFGWRITE(alphas.canvas_shape_guideline) + CFGWRITE(alphas.canvas_shape_mainpoint) + CFGWRITE(alphas.canvas_shape_outline) + CFGWRITE(alphas.canvas_shape_selectpoint) + CFGWRITE(sizes.origincross) + CFGWRITE(behaviors.autoaskimgopac) + CFGWRITE(behaviors.capitalizecmds) + CFGWRITE(behaviors.parse_spc) + CFGWRITE(behaviors.nosplashscreen) + CFGWRITE(behaviors.confirmquit) + config->SetPath(_T("..")); +} diff --git a/assdraw/src/bitmaps/Copy of assdraw3.bmp b/assdraw/src/bitmaps/Copy of assdraw3.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4fe735e5bf1bc4002571d9e50ea67e9f68af2087 Binary files /dev/null and b/assdraw/src/bitmaps/Copy of assdraw3.bmp differ diff --git a/assdraw/src/bitmaps/add_.bmp b/assdraw/src/bitmaps/add_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5a87ed3fb61ecf967c3c6e8c688499cb34ba5e2d Binary files /dev/null and b/assdraw/src/bitmaps/add_.bmp differ diff --git a/assdraw/src/bitmaps/arr_.bmp b/assdraw/src/bitmaps/arr_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..34ec029d12add935038ec13030ba1ee9c85f6536 Binary files /dev/null and b/assdraw/src/bitmaps/arr_.bmp differ diff --git a/assdraw/src/bitmaps/arr_1.bmp b/assdraw/src/bitmaps/arr_1.bmp new file mode 100644 index 0000000000000000000000000000000000000000..14f71ee262bdbf90349b6a4192a7773ec0faf601 Binary files /dev/null and b/assdraw/src/bitmaps/arr_1.bmp differ diff --git a/assdraw/src/bitmaps/assdraw3.bmp b/assdraw/src/bitmaps/assdraw3.bmp new file mode 100644 index 0000000000000000000000000000000000000000..debaf3c8ba7af02954fce4a505d249fdac00f2f9 Binary files /dev/null and b/assdraw/src/bitmaps/assdraw3.bmp differ diff --git a/assdraw/src/bitmaps/b_.bmp b/assdraw/src/bitmaps/b_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3046a904840686fb8a5f1fded2d8b9e7cfa29e2c Binary files /dev/null and b/assdraw/src/bitmaps/b_.bmp differ diff --git a/assdraw/src/bitmaps/b_.cur b/assdraw/src/bitmaps/b_.cur new file mode 100644 index 0000000000000000000000000000000000000000..117906dd9c265a87b372c16f74027af59e493fc1 Binary files /dev/null and b/assdraw/src/bitmaps/b_.cur differ diff --git a/assdraw/src/bitmaps/c_.bmp b/assdraw/src/bitmaps/c_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8a37dae867d6be4f4791b6912361795a637de096 Binary files /dev/null and b/assdraw/src/bitmaps/c_.bmp differ diff --git a/assdraw/src/bitmaps/check_.bmp b/assdraw/src/bitmaps/check_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..41ca19aa3d69b56c0cb7a33245e35fea8559ac6b Binary files /dev/null and b/assdraw/src/bitmaps/check_.bmp differ diff --git a/assdraw/src/bitmaps/del_.bmp b/assdraw/src/bitmaps/del_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..034986fd0cd52f869f4e60611cb833efb6ad2f7b Binary files /dev/null and b/assdraw/src/bitmaps/del_.bmp differ diff --git a/assdraw/src/bitmaps/del_cross.bmp b/assdraw/src/bitmaps/del_cross.bmp new file mode 100644 index 0000000000000000000000000000000000000000..e6dc0957f5f7a9211784f97967b15aca428d45d2 Binary files /dev/null and b/assdraw/src/bitmaps/del_cross.bmp differ diff --git a/assdraw/src/bitmaps/help.bmp b/assdraw/src/bitmaps/help.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d5636e9aa2cbf0489f307f7b3e7db32fc7264a68 Binary files /dev/null and b/assdraw/src/bitmaps/help.bmp differ diff --git a/assdraw/src/bitmaps/help_.bmp b/assdraw/src/bitmaps/help_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..eac6f2e5eb678eafb65feadc64fcb829892980fa Binary files /dev/null and b/assdraw/src/bitmaps/help_.bmp differ diff --git a/assdraw/src/bitmaps/l_.bmp b/assdraw/src/bitmaps/l_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..92af791d0f08bec6d5fa88807a2176ceecea60cc Binary files /dev/null and b/assdraw/src/bitmaps/l_.bmp differ diff --git a/assdraw/src/bitmaps/m_.bmp b/assdraw/src/bitmaps/m_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5e5b4c8610a1893cacce226dbc9b2b8dde127ea9 Binary files /dev/null and b/assdraw/src/bitmaps/m_.bmp differ diff --git a/assdraw/src/bitmaps/n_.bmp b/assdraw/src/bitmaps/n_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..47c4ad7f2be9cbeec5ff75e88ec98af4f8300adc Binary files /dev/null and b/assdraw/src/bitmaps/n_.bmp differ diff --git a/assdraw/src/bitmaps/new_.bmp b/assdraw/src/bitmaps/new_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3c8f88d4144db9ca9042c7b5b7ab92a552365c7c Binary files /dev/null and b/assdraw/src/bitmaps/new_.bmp differ diff --git a/assdraw/src/bitmaps/nut_.bmp b/assdraw/src/bitmaps/nut_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f76644e38be090e22b53f724db2c2b1c243c388d Binary files /dev/null and b/assdraw/src/bitmaps/nut_.bmp differ diff --git a/assdraw/src/bitmaps/p_.bmp b/assdraw/src/bitmaps/p_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..67aeafa72c8792ba6eab9499c8424a228d02d06f Binary files /dev/null and b/assdraw/src/bitmaps/p_.bmp differ diff --git a/assdraw/src/bitmaps/pan_bg.bmp b/assdraw/src/bitmaps/pan_bg.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0587ca30ea3908745c46d726ad9d92e2f170e9e5 Binary files /dev/null and b/assdraw/src/bitmaps/pan_bg.bmp differ diff --git a/assdraw/src/bitmaps/pan_both.bmp b/assdraw/src/bitmaps/pan_both.bmp new file mode 100644 index 0000000000000000000000000000000000000000..84eb52fd04e479f512e58564a8e3dfacf78243a4 Binary files /dev/null and b/assdraw/src/bitmaps/pan_both.bmp differ diff --git a/assdraw/src/bitmaps/pan_shape.bmp b/assdraw/src/bitmaps/pan_shape.bmp new file mode 100644 index 0000000000000000000000000000000000000000..32ada0ae3d649175b6017150b02972a3e27c6735 Binary files /dev/null and b/assdraw/src/bitmaps/pan_shape.bmp differ diff --git a/assdraw/src/bitmaps/pan_shp.bmp b/assdraw/src/bitmaps/pan_shp.bmp new file mode 100644 index 0000000000000000000000000000000000000000..1b5da621bf7b9b8e2d29f51724c3a225d0230ab0 Binary files /dev/null and b/assdraw/src/bitmaps/pan_shp.bmp differ diff --git a/assdraw/src/bitmaps/preview_.bmp b/assdraw/src/bitmaps/preview_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b8b6fbe983d6abbfc6e7e77ef160f440575aaaff Binary files /dev/null and b/assdraw/src/bitmaps/preview_.bmp differ diff --git a/assdraw/src/bitmaps/rot_.bmp b/assdraw/src/bitmaps/rot_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b2c14a9065c762907a37fa72a54187a778d283bb Binary files /dev/null and b/assdraw/src/bitmaps/rot_.bmp differ diff --git a/assdraw/src/bitmaps/s_.bmp b/assdraw/src/bitmaps/s_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..1e8afab554fc392c634052869b72aec8d0c3b80a Binary files /dev/null and b/assdraw/src/bitmaps/s_.bmp differ diff --git a/assdraw/src/bitmaps/sc_rot_.bmp b/assdraw/src/bitmaps/sc_rot_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..546d7fdf176d709e65d428eb0f8a6c653d4dedf4 Binary files /dev/null and b/assdraw/src/bitmaps/sc_rot_.bmp differ diff --git a/assdraw/src/bitmaps/src_.bmp b/assdraw/src/bitmaps/src_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ae2e55e07d7146b4f94f9f94860a157264995cf9 Binary files /dev/null and b/assdraw/src/bitmaps/src_.bmp differ diff --git a/assdraw/src/bitmaps/transform.bmp b/assdraw/src/bitmaps/transform.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8ae24e5adedc729b62762af2530d9e2792564817 Binary files /dev/null and b/assdraw/src/bitmaps/transform.bmp differ diff --git a/assdraw/src/bitmaps/uncheck_.bmp b/assdraw/src/bitmaps/uncheck_.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b600bebece5db6b7773a9cde2d0f3a9a7aa1ebae Binary files /dev/null and b/assdraw/src/bitmaps/uncheck_.bmp differ diff --git a/assdraw/src/canvas.cpp b/assdraw/src/canvas.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a077c1ef526a42af6069d94e9182030fe600b11a --- /dev/null +++ b/assdraw/src/canvas.cpp @@ -0,0 +1,1997 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: canvas.cpp +// Purpose: implementations of ASSDraw main canvas class +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#include "assdraw.hpp" +#include "cmd.hpp" +#include "agg_gsv_text.h" +#include "agg_ellipse.h" +#include "agg_conv_dash.h" +#include "agg_trans_bilinear.h" +#include "agg_trans_perspective.h" + +#include "agghelper.hpp" +#include <math.h> +#include <wx/image.h> +#include <wx/filename.h> + +// ---------------------------------------------------------------------------- +// the main drawing canvas: ASSDrawCanvas +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(ASSDrawCanvas, ASSDrawEngine) + EVT_MOTION (ASSDrawCanvas::OnMouseMove) + EVT_LEFT_UP(ASSDrawCanvas::OnMouseLeftUp) + EVT_LEFT_DOWN(ASSDrawCanvas::OnMouseLeftDown) + EVT_RIGHT_UP(ASSDrawCanvas::OnMouseRightUp) + EVT_RIGHT_DOWN(ASSDrawCanvas::OnMouseRightDown) + EVT_RIGHT_DCLICK(ASSDrawCanvas::OnMouseRightDClick) + EVT_MOUSEWHEEL(ASSDrawCanvas::OnMouseWheel) + EVT_KEY_DOWN(ASSDrawCanvas::CustomOnKeyDown) + EVT_KEY_UP(ASSDrawCanvas::CustomOnKeyUp) + EVT_MENU(MENU_DRC_LNTOBEZ, ASSDrawCanvas::OnSelect_ConvertLineToBezier) + EVT_MENU(MENU_DRC_BEZTOLN, ASSDrawCanvas::OnSelect_ConvertBezierToLine) + EVT_MENU(MENU_DRC_C1CONTBEZ, ASSDrawCanvas::OnSelect_C1ContinuityBezier) + EVT_MENU(MENU_DRC_MOVE00, ASSDrawCanvas::OnSelect_Move00Here) + EVT_MOUSE_CAPTURE_LOST(ASSDrawCanvas::CustomOnMouseCaptureLost) +END_EVENT_TABLE() + +ASSDrawCanvas::ASSDrawCanvas(wxWindow *parent, ASSDrawFrame *frame, int extraflags) + : ASSDrawEngine( parent, extraflags ) +{ + m_frame = frame; + preview_mode = false; + lastDrag_left = NULL; + lastDrag_right = NULL; + dragAnchor_left = NULL; + dragAnchor_right = NULL; + newcommand = NULL; + mousedownAt_point = NULL; + pointedAt_point = NULL; + draw_mode = MODE_ARR; + + dragOrigin = false; + hilite_cmd = NULL; + hilite_point = NULL; + capturemouse_left = false; + capturemouse_right = false; + bgimg.bgbmp = NULL; + bgimg.bgimg = NULL; + bgimg.alpha = 0.5; + rectbound2upd = -1, rectbound2upd2 = -1; + + rgba_shape_normal = agg::rgba(0,0,1,0.5); + rgba_outline = agg::rgba(0,0,0); + rgba_guideline = agg::rgba(0.5,0.5,0.5); + rgba_mainpoint = agg::rgba(1,0,0,0.75); + rgba_controlpoint = agg::rgba(0,1,0,0.75); + rgba_selectpoint = agg::rgba(0,0,1,0.75); + rgba_origin = agg::rgba(0,0,0); + rgba_ruler_h = agg::rgba(0,0,1); + rgba_ruler_v = agg::rgba(1,0,0); + + wxFlexGridSizer* sizer = new wxFlexGridSizer(1, 1, 0); + sizer->AddGrowableRow(0); + sizer->AddGrowableCol(0); + sizer->Add( this, 0, wxGROW|wxGROW, 5); + parent->SetSizer(sizer); + + // for background image loading + ::wxInitAllImageHandlers(); + bgimg.bgbmp = NULL; + bgimg.bgimg = NULL; + // drag image background file + SetDropTarget(new ASSDrawFileDropTarget(this)); + + hasStatusBar = m_frame->GetStatusBar() != NULL; + + // cursor = crosshair + SetCursor( *wxCROSS_CURSOR ); + + bgimg.alpha_dlg = new wxDialog(this, wxID_ANY, wxString(_T("Background image opacity"))); + bgimg.alpha_slider = new wxSlider(bgimg.alpha_dlg, TB_BGALPHA_SLIDER, 50, 0, 100, __DPDS__ , wxSL_LABELS); + bgimg.alpha_slider->SetSize(280, bgimg.alpha_slider->GetSize().y); + bgimg.alpha_dlg->Fit(); + bgimg.alpha_dlg->Show(false); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + bgimg.alpha_slider->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(ASSDrawCanvas::OnAlphaSliderChanged), NULL, this); + + RefreshUndocmds(); + +} + +// Destructor +ASSDrawCanvas::~ASSDrawCanvas() +{ + ASSDrawEngine::ResetEngine(false); + if (pointsys) delete pointsys; + if (bgimg.bgbmp) delete bgimg.bgbmp; + if (bgimg.bgimg) delete bgimg.bgimg; +} + +void ASSDrawCanvas::ParseASS(wxString str, bool addundo) +{ + if (addundo) + AddUndo(_T("Modify drawing commands")); + + ASSDrawEngine::ParseASS(str); + + RefreshUndocmds(); +} + +void ASSDrawCanvas::ResetEngine(bool addM) +{ + ClearPointsSelection(); + SetHighlighted(NULL, NULL); + SetPreviewMode(false); + SetDrawMode(MODE_ARR); + ASSDrawEngine::ResetEngine(addM); + RefreshUndocmds(); +} + +void ASSDrawCanvas::SetPreviewMode(bool mode) +{ + preview_mode = mode; + if (preview_mode) + { + if (mousedownAt_point != NULL) + { + mousedownAt_point->cmd_main->Init(); + mousedownAt_point = NULL; + } + + if (pointedAt_point != NULL) + pointedAt_point = NULL; + + SetHighlighted( NULL, NULL ); + + RefreshDisplay(); + } +} + +// (Re)draw canvas +void ASSDrawCanvas::RefreshDisplay() +{ + ASSDrawEngine::RefreshDisplay(); + wxString asscmds = GenerateASS(); + if (oldasscmds != asscmds) + { + m_frame->UpdateASSCommandStringToSrcTxtCtrl(asscmds); + oldasscmds = asscmds; + } +} + +void ASSDrawCanvas::SetDrawMode( MODE mode ) +{ + draw_mode = mode; + + if (!selected_points.empty()) + ClearPointsSelection(); + + RefreshDisplay(); + + if (IsTransformMode()) + { + isshapetransformable = cmds.size() > 1; + + if (isshapetransformable) + { + + // backup cmds + backupcmds.free_all(); + for (DrawCmdList::iterator iterate = cmds.begin(); iterate != cmds.end(); iterate++) + { + DrawCmd* cmd = (*iterate); + for (PointList::iterator iterate2 = cmd->controlpoints.begin(); iterate2 != cmd->controlpoints.end(); iterate2++) + { + wxPoint pp = (*iterate2)->ToWxPoint(); + backupcmds.move_to(pp.x, pp.y); + } + wxPoint pp = (*iterate)->m_point->ToWxPoint(); + backupcmds.move_to(pp.x, pp.y); + } + + // calculate bounding rectangle + agg::trans_affine mtx; + trans_path *rm, *rb; + agg::conv_curve<trans_path> *rc; + ConstructPathsAndCurves(mtx, rm, rb, rc); + rasterizer.reset(); + rasterizer.add_path(*rc); + delete rm; + delete rb; + delete rc; + int minx = rasterizer.min_x(), miny = rasterizer.min_y(); + int maxx = rasterizer.max_x(), maxy = rasterizer.max_y(); + + rectbound[0] = wxRealPoint(minx, miny); + rectbound[1] = wxRealPoint(maxx, miny); + rectbound[2] = wxRealPoint(maxx, maxy); + rectbound[3] = wxRealPoint(minx, maxy); + for (int i = 0; i < 4; i++) + rectbound2[i] = rectbound[i]; + + rectbound2upd = -1; + rectbound2upd2 = -1; + + backupowner = NONE; + InitiateDraggingIfTransformMode(); + + if (maxx - minx < 5 || maxy - miny < 5) + isshapetransformable = false; + } + } + + RefreshUndocmds(); + m_frame->UpdateFrameUI(); + +} + +void ASSDrawCanvas::SetDragMode( DRAGMODE mode ) +{ + drag_mode = mode; +} + +bool ASSDrawCanvas::IsTransformMode() +{ + return draw_mode == MODE_NUT_BILINEAR || draw_mode == MODE_SCALEROTATE; +} + +bool ASSDrawCanvas::CanZoom() +{ + return !IsTransformMode() || !drag_mode.drawing; +} + +bool ASSDrawCanvas::CanMove() +{ + return !IsTransformMode() || dragAnchor_left == NULL; +} + +// Do the dragging +void ASSDrawCanvas::OnMouseMove(wxMouseEvent &event) +{ + mouse_point = event.GetPosition(); + int xx, yy, wx, wy; + xx = mouse_point.x; yy = mouse_point.y; + pointsys->FromWxPoint ( mouse_point, wx, wy ); + if (event.Dragging()) + { + if (IsTransformMode() && isshapetransformable && backupowner == LEFT) + { + // update bounding polygon + if (rectbound2upd > -1) + { + if (!dragAnchor_left) dragAnchor_left = new wxPoint(mouse_point); + wxPoint diff = mouse_point - *dragAnchor_left; + wxRealPoint rdiff(diff.x, diff.y); + switch(draw_mode) + { + case MODE_NUT_BILINEAR: + if (rectbound2upd2 == -1) //only one vertex dragged + rectbound2[rectbound2upd].x = xx, rectbound2[rectbound2upd].y = yy; + else + { + rectbound2[rectbound2upd].x += diff.x, rectbound2[rectbound2upd].y += diff.y; + rectbound2[rectbound2upd2].x += diff.x, rectbound2[rectbound2upd2].y += diff.y; + } + undodesc = _T("Bilinear transform"); + *dragAnchor_left = mouse_point; + break; + case MODE_SCALEROTATE: + if (rectbound2upd2 == -1) //only one vertex dragged + { + int adjacent[2] = { (rectbound2upd + 3) % 4, (rectbound2upd + 1) % 4 }; + int opposite = (rectbound2upd + 2) % 4; + wxRealPoint newpoint = backup[rectbound2upd] + rdiff; + double nx, ny; + for (int i = 0; i < 2; i++) + { + bool isect = agg::calc_intersection( + backup[opposite].x, backup[opposite].y, + backup[adjacent[i]].x, backup[adjacent[i]].y, + newpoint.x, newpoint.y, + backup[adjacent[i]].x + diff.x, backup[adjacent[i]].y + diff.y, + &nx, &ny); + if (isect && !(fabs(nx - backup[opposite].x) < 10 && fabs(ny - backup[opposite].y) < 10)) + rectbound2[adjacent[i]] = wxRealPoint(nx, ny); + } + GetThe4thPoint(backup[opposite].x, backup[opposite].y, + rectbound2[adjacent[0]].x, rectbound2[adjacent[0]].y, + rectbound2[adjacent[1]].x, rectbound2[adjacent[1]].y, + &rectbound2[rectbound2upd].x, &rectbound2[rectbound2upd].y); + if (event.ShiftDown()) // shift down = maintain aspect ratio (damn so complicated) + { + // first create the guide points, which are basically backup points reoriented based on mouse position + wxRealPoint guide[4]; + guide[opposite] = backup[opposite]; + guide[adjacent[0]] = backup[adjacent[0]]; + guide[adjacent[1]] = backup[adjacent[1]]; + for (int i = 0; i < 2; i++) + { + if ((rectbound2[adjacent[i]].x < guide[opposite].x && guide[opposite].x < guide[adjacent[i]].x) + || (rectbound2[adjacent[i]].x > guide[opposite].x && guide[opposite].x > guide[adjacent[i]].x) + || (rectbound2[adjacent[i]].y < guide[opposite].y && guide[opposite].y < guide[adjacent[i]].y) + || (rectbound2[adjacent[i]].y > guide[opposite].y && guide[opposite].y > guide[adjacent[i]].y)) + { + guide[adjacent[i]] = guide[opposite] - (guide[adjacent[i]] - guide[opposite]); + } + } + guide[rectbound2upd] = guide[adjacent[0]] + (guide[adjacent[1]] - guide[opposite]); + // now we determine which rescaled sides have larger enlargement/shrinkage ratio .. + double ix[2], iy[2], dx[2], dy[2]; + for (int i = 0; i < 2; i++) + { + agg::calc_intersection(guide[opposite].x, guide[opposite].y, guide[rectbound2upd].x, guide[rectbound2upd].y, + rectbound2[rectbound2upd].x, rectbound2[rectbound2upd].y, + rectbound2[adjacent[i]].x, rectbound2[adjacent[i]].y, &ix[i], &iy[i]); + dx[i] = ix[i] - guide[opposite].x; + dy[i] = iy[i] - guide[opposite].y; + } + // .. and modify the other sides to follow the ratio + for (int i = 0; i < 2; i++) + { + int j = (i + 1) % 2; + if (fabs(dx[i]) > fabs(dx[j]) || fabs(dy[i]) > fabs(dy[j])) + { + rectbound2[rectbound2upd].x = ix[i]; + rectbound2[rectbound2upd].y = iy[i]; + GetThe4thPoint(rectbound2[adjacent[i]].x, rectbound2[adjacent[i]].y, + guide[opposite].x, guide[opposite].y, ix[i], iy[i], + &rectbound2[adjacent[j]].x, &rectbound2[adjacent[j]].y); + } + } + } + } + else // an edge dragged (i.e. move 2 vertices in sync) + { + // it is guaranteed that rectbound2upd and rectbound2upd2 are in clockwise direction + // from the way they are detected in OnMouseLeftDown() + int toupd[2] = { rectbound2upd, rectbound2upd2 }; + int adjacent[2] = { (rectbound2upd2 + 2) % 4, (rectbound2upd2 + 1) % 4 }; + wxRealPoint vertexone = backup[toupd[0]] + rdiff, vertextwo = backup[toupd[1]] + rdiff; + double nx, ny; + for (int i = 0; i < 2; i++) + { + agg::calc_intersection( + rectbound2[adjacent[i]].x, rectbound2[adjacent[i]].y, + backup[toupd[i]].x, backup[toupd[i]].y, + vertexone.x, vertexone.y, + vertextwo.x, vertextwo.y, + &nx, &ny); + if (!(fabs(nx - backup[adjacent[i]].x) < 10 && fabs(ny - backup[adjacent[i]].y) < 10)) + rectbound2[toupd[i]].x = (int) nx, rectbound2[toupd[i]].y = (int) ny; + } + } + UpdateTranformModeRectCenter(); + undodesc = _T("Scale"); + break; + } + + // update points + UpdateNonUniformTransformation(); + RefreshDisplay(); + } + } + else if (draw_mode != MODE_DEL) + { + + // point left-dragged + if (mousedownAt_point != NULL && mousedownAt_point->isselected) + { + if (!mousedownAt_point->IsAt( wx, wy )) + { + if (draw_mode == MODE_ARR) { + int movex = wx - mousedownAt_point->x(), movey = wy - mousedownAt_point->y(); + PointSet::iterator iter = selected_points.begin(); + for (; iter != selected_points.end(); iter++) + (*iter)->setXY( (*iter)->x() + movex, (*iter)->y() + movey ); + } + else + mousedownAt_point->setXY( wx, wy ); + + EnforceC1Continuity (mousedownAt_point->cmd_main, mousedownAt_point); + + RefreshDisplay(); + if (undodesc == _T("")) + { + if (mousedownAt_point->type == MP) + undodesc = _T("Drag point"); + else + undodesc = _T("Drag control point"); + } + } + } + // origin left-dragged + else if (dragOrigin) + { + if (wx != 0 || wy != 0) + { + wxPoint wxp = pointsys->ToWxPoint ( wx, wy ); + MovePoints(-wx, -wy); + pointsys->originx = wxp.x; + pointsys->originy = wxp.y; + RefreshDisplay(); + undodesc = _T("Move origin"); + } + } + else if (dragAnchor_left != NULL) + { + // handle left-dragging here + if (lastDrag_left && dragAnchor_left != lastDrag_left) + delete lastDrag_left; + lastDrag_left = new wxPoint(xx, yy); + int ax = dragAnchor_left->x, ay = dragAnchor_left->y; + int sx = lastDrag_left->x, sy = lastDrag_left->y; + int lx, rx, ty, by; + if (ax > sx) lx = sx, rx = ax; + else lx = ax, rx = sx; + if (ay > sy) ty = sy, by = ay; + else ty = ay, by = sy; + SelectPointsWithin( lx, rx, ty, by, GetSelectMode(event) ); + RefreshDisplay(); + } + } + + // right-dragged + if (dragAnchor_right != NULL) + { + if (draw_mode == MODE_SCALEROTATE) + { + if (backupowner == RIGHT) + { + double cx = rectcenter.x, cy = rectcenter.y; // center x,y + double diameter = sqrt(pow(rectbound2[0].x - rectbound2[2].x, 2) + pow(rectbound2[0].y - rectbound2[2].y, 2)); + double radius = diameter / 2; + double old_dx = dragAnchor_right->x - cx, old_dy = dragAnchor_right->y - cy; + double new_dx = mouse_point.x - cx, new_dy = mouse_point.y - cy; + double old_angle = atan2(old_dy, old_dx); + double new_angle = atan2(new_dy, new_dx); + double delta = new_angle - old_angle; + for (int i = 0; i < 4; i++) + { + old_dx = backup[i].x - cx, old_dy = backup[i].y - cy; + old_angle = atan2(old_dy, old_dx); + new_angle = old_angle + delta; + new_dx = radius * cos(new_angle), new_dy = radius * sin(new_angle); + rectbound2[i].x = (int)(new_dx + cx), rectbound2[i].y = (int)(new_dy + cy); + } + UpdateNonUniformTransformation(); + RefreshDisplay(); + undodesc = _T("Rotate"); + } + } + else if (CanMove()) + { + MoveCanvas(xx - dragAnchor_right->x, yy - dragAnchor_right->y); + dragAnchor_right->x = xx; + dragAnchor_right->y = yy; + RefreshDisplay(); + } + } + } + else if (!preview_mode)// not dragging and not preview mode + { + if (IsTransformMode()) + { + int oldrectbound = rectbound2upd; + rectbound2upd = -1; + rectbound2upd2 = -1; + for (int i = 0; i < 4; i++) + { + if (abs((int)rectbound2[i].x - mouse_point.x) <= pointsys->scale + && abs((int)rectbound2[i].y - mouse_point.y) <= pointsys->scale) + rectbound2upd = i; + } + for (int i = 0; rectbound2upd == -1 && i < 4; i++) + { + int j = (i+1) % 4; + wxRealPoint &pi = rectbound2[i], &pj = rectbound2[j]; + double dy = fabs(pj.y - pi.y); + double dy3 = dy / 3; + double dx = fabs(pj.x - pi.x); + double dx3 = dx / 3; + double ix, iy; + bool intersect = false; + if (dy > dx) + { + intersect = agg::calc_intersection( + pi.x, pi.y, pj.x, pj.y, + mouse_point.x - pointsys->scale, mouse_point.y, + mouse_point.x + pointsys->scale, mouse_point.y, &ix, &iy); + intersect &= fabs(mouse_point.x - ix) <= pointsys->scale; + intersect &= (pj.y > pi.y? + pj.y - dy3 > iy && iy > pi.y + dy3: + pj.y + dy3 < iy && iy < pi.y - dy3); + } + else + { + intersect = agg::calc_intersection( + pi.x, pi.y, pj.x, pj.y, + mouse_point.x, mouse_point.y - pointsys->scale, + mouse_point.x, mouse_point.y + pointsys->scale, &ix, &iy); + intersect &= fabs(mouse_point.y - iy) <= pointsys->scale; + intersect &= (pj.x > pi.x? + pj.x - dx3 > ix && ix > pi.x + dx3: + pj.x + dx3 < ix && ix < pi.x - dx3); + } + if (intersect) + { + rectbound2upd = i; + rectbound2upd2 = j; + } + } + if (rectbound2upd != -1 || oldrectbound != -1) + RefreshDisplay(); + } + else + { + /* figure out if the mouse is pointing at a point of a command + we need not do this for dragging since this same block has set + the related variables before the user starts to hold the button + (well, before you can drag something you have to move the pointer + over that thing first, right?) and we don't want to mess with those + when it's dragging + */ + + // check if mouse points on any control point first + Point* last_pointedAt_point = pointedAt_point; + ControlAt( wx, wy, pointedAt_point ); + + // then check if mouse points on any m_points + // override any control point set to pointedAt_point above + DrawCmd* p = PointAt( wx, wy ); + if (p != NULL) + { + pointedAt_point = p->m_point; + } + + if (pointedAt_point != last_pointedAt_point) + { + if (pointedAt_point != NULL) + SetHighlighted( pointedAt_point->cmd_main, pointedAt_point ); + else + SetHighlighted( NULL, NULL ); + RefreshDisplay(); + } + } + } // not dragging and preview mode = ignore all mouse movements + + // we are not done yet? + // oh yeah, we need to set the status bar just for fun + if (hasStatusBar) + { + m_frame->SetStatusText( + wxString::Format( _T("%5d %5d"), (int)wx, (int)wy ), 0 ); + if (pointedAt_point == NULL || + (newcommand != NULL && !newcommand->initialized) ) + m_frame->SetStatusText( _T(""), 1 ); + else + m_frame->SetStatusText( _T(" ") + pointedAt_point->cmd_main->ToString().Upper(), 1 ); + } + +} + +// End drag points +void ASSDrawCanvas::OnMouseLeftUp(wxMouseEvent& event) +{ + ProcessOnMouseLeftUp(); + event.Skip( true ); +} + +void ASSDrawCanvas::ProcessOnMouseLeftUp() +{ + if (!capturemouse_left) return; + + // draw mode + if (newcommand != NULL) + { + newcommand->Init(); + switch (newcommand->type) + { + case M: + undodesc = _T("Add a new M"); break; + case L: + undodesc = _T("Add a new L"); break; + case B: + undodesc = _T("Add a new B"); break; + } + newcommand = NULL; + // we need to manually refresh the GUI to draw the new control points + RefreshDisplay(); + } + else if ( draw_mode == MODE_DEL // if it's delete mode + && mousedownAt_point != NULL // and mouse down at a point + && mousedownAt_point == pointedAt_point ) // and released at the same point + { + // first take care of mouse readings + pointedAt_point = NULL; + Point *lastmousedownAt_point = mousedownAt_point; + mousedownAt_point = NULL; + + // try deleting + CMDTYPE t = lastmousedownAt_point->cmd_main->type; + if ( DeleteCommand( lastmousedownAt_point->cmd_main ) ) + { + ClearPointsSelection(); + SetHighlighted( NULL, NULL ); + RefreshDisplay(); + switch (t) + { + case M: + undodesc = _T("Delete a M"); break; + case L: + undodesc = _T("Delete a L"); break; + case B: + undodesc = _T("Delete a B"); break; + } + } + else + { + RefreshDisplay(); // redraw before showing the error box + wxMessageDialog msgb(m_frame, + _T("You must delete that command/point last"), + _T("Error"), wxOK | wxICON_EXCLAMATION ); + msgb.ShowModal(); + } + } + else if ( lastDrag_left && dragAnchor_left ) // point selection + { + if (lastDrag_left && dragAnchor_left != lastDrag_left) + delete lastDrag_left; + delete dragAnchor_left; + lastDrag_left = NULL; + dragAnchor_left = NULL; + } + + if (dragOrigin) + { + dragOrigin = false; + RefreshDisplay(); // clear the crosshair + } + + rectbound2upd = -1; + rectbound2upd2 = -1; + backupowner = NONE; + + if (!undodesc.IsSameAs(_T(""))) + { + AddUndo( undodesc ); + undodesc = _T(""); + RefreshUndocmds(); + } + + mousedownAt_point = NULL; + + if (HasCapture()) + ReleaseMouse(); + capturemouse_left = false; + + RefreshDisplay(); +} + +// Set up to drag points, if any +void ASSDrawCanvas::OnMouseLeftDown(wxMouseEvent& event) +{ + + // no drawing in preview mode + if (preview_mode) + return; + + wxPoint q = event.GetPosition(); + + // wxPoint to Point + int px, py; + pointsys->FromWxPoint(q, px, py); + + // create new cmd if in draw mode / or delete point if del tool selected + switch (draw_mode) + { + case MODE_M: + newcommand = NewCmd(M, px, py); + break; + case MODE_L: + newcommand = NewCmd(L, px, py); + break; + case MODE_B: + newcommand = NewCmd(B, px, py); + break; + } + + // continue working on the new command (if any) + // only if it is not mouse down on any control point + if (newcommand != NULL) + { + if (pointedAt_point != NULL && pointedAt_point->type == CP) + { + // oops, user clicked on a control point so cancel new command + // and let him drag the control point + delete newcommand; + newcommand = NULL; + } + else + { + // first set to drag the new command no matter what + mousedownAt_point = newcommand->m_point; + + // if user drags from existing point, insert the new command + // else append the new command + if (pointedAt_point != NULL) + InsertCmd( newcommand, pointedAt_point->cmd_main ); + else + { + if (cmds.empty() && newcommand->type != M) + AppendCmd( M, px, py ); + newcommand = AppendCmd( newcommand ); + } + + pointedAt_point = mousedownAt_point; + + //highlight it + SetHighlighted( newcommand, newcommand->m_point ); + } + } + + // we already calculated pointedAt_point in OnMouseMove() so just use it + mousedownAt_point = pointedAt_point; + SELECTMODE smode = GetSelectMode(event); + if (mousedownAt_point && !mousedownAt_point->isselected) + { + if (smode == NEW) + { + ClearPointsSelection(); + mousedownAt_point->isselected = true; + selected_points.insert(mousedownAt_point); + } + else + { + wxPoint wxp = mousedownAt_point->ToWxPoint(); + SelectPointsWithin(wxp.x, wxp.x, wxp.y, wxp.y, smode); + } + } + else if (!mousedownAt_point && smode == NEW) + ClearPointsSelection(); + + if ( mousedownAt_point == NULL && px == 0 && py == 0 ) + dragOrigin = true; + + if ( mousedownAt_point == NULL && !dragOrigin ) + { + dragAnchor_left = new wxPoint(q.x, q.y); + lastDrag_left = dragAnchor_left; + } + + if (InitiateDraggingIfTransformMode()) + backupowner = LEFT; + + CaptureMouse(); + capturemouse_left = true; + RefreshDisplay(); + + event.Skip( true ); +} + +// End drag the canvas +void ASSDrawCanvas::OnMouseRightUp(wxMouseEvent& event) +{ + ProcessOnMouseRightUp(); + event.Skip( true ); +} + +void ASSDrawCanvas::ProcessOnMouseRightUp() +{ + if (!capturemouse_right) return; + + if (lastDrag_right && dragAnchor_right != lastDrag_right) + delete lastDrag_right; + if (dragAnchor_right) + delete dragAnchor_right; + dragAnchor_right = NULL; + lastDrag_right = NULL; + + // don't crash the program + if (HasCapture()) + ReleaseMouse(); + capturemouse_right = false; + + rectbound2upd = -1; + rectbound2upd2 = -1; + backupowner = NONE; + + if (!undodesc.IsSameAs(_T(""))) + { + AddUndo( undodesc ); + undodesc = _T(""); + RefreshUndocmds(); + } + + RefreshDisplay(); + SetFocus(); +} + +// Set up to drag the canvas +void ASSDrawCanvas::OnMouseRightDown(wxMouseEvent &event) +{ + wxPoint q = event.GetPosition(); + dragAnchor_right = new wxPoint(q.x, q.y); + lastDrag_right = dragAnchor_right; + CaptureMouse(); + capturemouse_right = true; + + if (InitiateDraggingIfTransformMode()) + backupowner = RIGHT; + + event.Skip( true ); +} + +// Reset to point-and-drag mode +void ASSDrawCanvas::OnMouseRightDClick(wxMouseEvent& event) +{ + wxMenu* menu = new wxMenu(); + + if (pointedAt_point) + { + ProcessOnMouseLeftUp(); + ProcessOnMouseRightUp(); + dblclicked_point_right = pointedAt_point; + pointedAt_point = NULL; + wxMenuItem *cmdmenuitem = new wxMenuItem(menu, MENU_DUMMY, dblclicked_point_right->cmd_main->ToString()); +#ifdef __WINDOWS__ + wxFont f = cmdmenuitem->GetFont(); + f.SetWeight(wxFONTWEIGHT_BOLD); + cmdmenuitem->SetFont(f); +#endif + menu->Append(cmdmenuitem); + menu->Enable(MENU_DUMMY, false); + switch (dblclicked_point_right->cmd_main->type) + { + case L: + menu->Append(MENU_DRC_LNTOBEZ, _T("Convert to Bezier curve (B command)")); + break; + case B: + if (dblclicked_point_right->type != MP) break; + menu->AppendCheckItem(MENU_DRC_BEZTOLN, _T("Convert to line (L command)")); + if (dblclicked_point_right->cmd_next && dblclicked_point_right->cmd_next->type == B) + { + menu->AppendCheckItem(MENU_DRC_C1CONTBEZ, _T("Smooth connection")); + if (static_cast<DrawCmd_B*>(dblclicked_point_right->cmd_main)->C1Cont) + menu->Check(MENU_DRC_C1CONTBEZ, true); + } + break; + } + + } + else + { + menu->Append(MENU_DRC_MOVE00, _T("Move [0,0] here")); + menu->AppendSeparator(); + menu->AppendRadioItem(MODE_ARR, _T("Mode: D&rag")); + menu->AppendRadioItem(MODE_M, _T("Mode: Draw &M")); + menu->AppendRadioItem(MODE_L, _T("Mode: Draw &L")); + menu->AppendRadioItem(MODE_B, _T("Mode: Draw &B")); + menu->AppendRadioItem(MODE_DEL, _T("Mode: &Delete")); + menu->Check(GetDrawMode(), true); + } + + if (menu->GetMenuItemCount() > 0) // only if there is menu item + { + SetHighlighted(NULL, NULL); + mousedownAt_point = NULL; + RefreshDisplay(); + PopupMenu(menu); + } + delete menu; + + event.Skip( true ); +} + +bool ASSDrawCanvas::InitiateDraggingIfTransformMode() +{ + if (IsTransformMode() && isshapetransformable && backupowner == NONE) + { + for (int i = 0; i < 4; i++) + backup[i] = rectbound2[i]; + UpdateTranformModeRectCenter(); + return true; + } + else + return false; +} + +void ASSDrawCanvas::UpdateTranformModeRectCenter() +{ + double cx, cy; + if (agg::calc_intersection(rectbound2[0].x, rectbound2[0].y, rectbound2[2].x, rectbound2[2].y, + rectbound2[1].x, rectbound2[1].y, rectbound2[3].x, rectbound2[3].y, &cx, &cy)) + { + rectcenter = wxRealPoint(cx, cy); + } +} + +bool ASSDrawCanvas::GetThe4thPoint(double ox, double oy, double a1x, double a1y, double a2x, double a2y, double *x, double *y) +{ + *x = a1x + a2x - ox; + *y = a1y + a2y - oy; + return true; +} + +// Mousewheel +void ASSDrawCanvas::OnMouseWheel(wxMouseEvent &event) +{ + double amount = event.GetWheelRotation() / event.GetWheelDelta(); + if (event.ControlDown()) amount /= 10.0; + bgimg.new_center = wxRealPoint(mouse_point.x, mouse_point.y); + ChangeZoomLevel( amount, mouse_point ); +} + +void ASSDrawCanvas::ChangeZoomLevelTo( double zoom, wxPoint bgzoomctr ) +{ + ChangeZoomLevel(zoom - pointsys->scale, bgzoomctr); +} + +void ASSDrawCanvas::ChangeZoomLevel( double amount, wxPoint bgzoomctr ) +{ + double old_scale = pointsys->scale; + if (CanZoom() && drag_mode.drawing) + ChangeDrawingZoomLevel( amount ); + + if (CanZoom() && drag_mode.bgimg) + if (drag_mode.drawing) + ChangeBackgroundZoomLevel(bgimg.scale * pointsys->scale / old_scale, wxRealPoint(pointsys->originx, pointsys->originy)); + else + ChangeBackgroundZoomLevel(bgimg.scale + amount / 10.0, wxRealPoint(bgzoomctr.x, bgzoomctr.y)); + + RefreshDisplay(); +} + +void ASSDrawCanvas::ChangeDrawingZoomLevel( double scrollamount ) +{ + if (!CanZoom()) return; + double zoom = pointsys->scale + scrollamount; + if (zoom <= 50.0) + { + if (zoom < 1.0) zoom = 1.0; + pointsys->scale = zoom; + } + + m_frame->UpdateFrameUI(); +} + +void ASSDrawCanvas::ChangeBackgroundZoomLevel(double zoom, wxRealPoint newcenter) +{ + bgimg.new_scale = zoom; + bgimg.new_center = newcenter; + if (bgimg.new_scale < 0.01) bgimg.new_scale = 0.01; + UpdateBackgroundImgScalePosition(); +} + +void ASSDrawCanvas::MoveCanvasOriginTo(double originx, double originy) +{ + MoveCanvas(originx - pointsys->originx, originy - pointsys->originy); +} + +void ASSDrawCanvas::MoveCanvas(double xamount, double yamount) +{ + if (CanMove() && drag_mode.drawing) + MoveCanvasDrawing(xamount, yamount); + if (CanMove() && drag_mode.bgimg) + MoveCanvasBackground(xamount, yamount); +} + +void ASSDrawCanvas::MoveCanvasDrawing(double xamount, double yamount) +{ + if (!CanMove()) return; + pointsys->originx += xamount; + pointsys->originy += yamount; + if (IsTransformMode()) + { + for (int i = 0; i < 4; i++) + { + rectbound[i].x += (int) xamount; + rectbound[i].y += (int) yamount; + rectbound2[i].x += (int) xamount; + rectbound2[i].y += (int) yamount; + } + unsigned vertices = backupcmds.total_vertices(); + double x, y; + for (int i = 0; i < vertices; i++) + { + backupcmds.vertex(i, &x, &y); + backupcmds.modify_vertex(i, x + xamount, y + yamount); + } + } +} + +void ASSDrawCanvas::MoveCanvasBackground(double xamount, double yamount) +{ + bgimg.new_disp.x += xamount; + bgimg.new_disp.y += yamount; + UpdateBackgroundImgScalePosition(); +} + +void ASSDrawCanvas::OnSelect_ConvertLineToBezier(wxCommandEvent&) +{ + if (!dblclicked_point_right) return; + AddUndo( _T("Convert Line to Bezier") ); + DrawCmd_B *newB = new DrawCmd_B(dblclicked_point_right->x(), dblclicked_point_right->y(), + pointsys, dblclicked_point_right->cmd_main); + InsertCmd ( newB, dblclicked_point_right->cmd_main ); + ClearPointsSelection(); + SetHighlighted(NULL, NULL); + DeleteCommand(dblclicked_point_right->cmd_main); + pointedAt_point = newB->m_point; + newB->Init(); + RefreshDisplay(); + RefreshUndocmds(); +} + +void ASSDrawCanvas::OnSelect_ConvertBezierToLine(wxCommandEvent&) +{ + if (!dblclicked_point_right) return; + AddUndo( _T("Convert Bezier to Line") ); + DrawCmd_L *newL = new DrawCmd_L(dblclicked_point_right->x(), dblclicked_point_right->y(), pointsys, dblclicked_point_right->cmd_main); + InsertCmd ( newL, dblclicked_point_right->cmd_main ); + ClearPointsSelection(); + SetHighlighted(NULL, NULL); + DeleteCommand(dblclicked_point_right->cmd_main); + pointedAt_point = newL->m_point; + newL->Init(); + RefreshDisplay(); + RefreshUndocmds(); +} + +void ASSDrawCanvas::OnSelect_C1ContinuityBezier(wxCommandEvent&) +{ + if (!dblclicked_point_right) return; + DrawCmd_B *cmdb = static_cast<DrawCmd_B*>(dblclicked_point_right->cmd_main); + AddUndo( cmdb->C1Cont? _T("Unset continuous"):_T("Set continuous") ); + cmdb->C1Cont = !cmdb->C1Cont; + RefreshUndocmds(); +} + +void ASSDrawCanvas::OnSelect_Move00Here(wxCommandEvent&) +{ + AddUndo( _T("Move origin") ); + int wx, wy; + pointsys->FromWxPoint(mouse_point, wx, wy); + wxPoint wxp = pointsys->ToWxPoint(wx, wy); + pointsys->originx = wxp.x; + pointsys->originy = wxp.y; + MovePoints(-wx, -wy); + RefreshDisplay(); + RefreshUndocmds(); +} + +void ASSDrawCanvas::ConnectSubsequentCmds (DrawCmd* cmd1, DrawCmd* cmd2) +{ + ASSDrawEngine::ConnectSubsequentCmds(cmd1, cmd2); + if (cmd1 && cmd1->type == B) + { + DrawCmd_B *cmd1b = static_cast< DrawCmd_B* >(cmd1); + cmd1b->C1Cont = false; + } +} + +void ASSDrawCanvas::EnforceC1Continuity (DrawCmd* cmd, Point* pnt) +{ + if (!cmd || !pnt) return; + if (cmd->type != B && cmd->type != S) return; + if (pnt->type == MP) return; + Point *theotherpoint, *mainpoint; + if (pnt->num == 1) + { + if (!cmd->prev || (cmd->prev->type != B && cmd->prev->type != S)) return; + DrawCmd_B *prevb = static_cast< DrawCmd_B* >(cmd->prev); + if (!prevb->C1Cont) return; + PointList::iterator it = prevb->controlpoints.end(); + it--; + theotherpoint = *it; + mainpoint = prevb->m_point; + } + else if (pnt->num = cmd->controlpoints.size()) + { + DrawCmd_B *thisb = static_cast< DrawCmd_B* >(cmd); + if (!thisb->C1Cont) return; + theotherpoint = *(cmd->m_point->cmd_next->controlpoints.begin()); + mainpoint = thisb->m_point; + } + else + return; + theotherpoint->setXY( mainpoint->x() + mainpoint->x() - pnt->x(), + mainpoint->y() + mainpoint->y() - pnt->y() ); +} + +// Undo/Redo system +void ASSDrawCanvas::AddUndo( wxString desc ) +{ + PrepareUndoRedo(_undo, false, _T(""), desc); + undos.push_back( _undo ); + // also empty redos + redos.clear(); + m_frame->UpdateUndoRedoMenu(); +} + +bool ASSDrawCanvas::UndoOrRedo(bool isundo) +{ + std::list<UndoRedo>* main = (isundo? &undos:&redos); + std::list<UndoRedo>* sub = (isundo? &redos:&undos); + + if (main->empty()) + return false; + + UndoRedo r = main->back(); + // push into sub + UndoRedo nr(r); + PrepareUndoRedo(nr, true, GenerateASS(), r.desc); + sub->push_back( nr ); + // parse + r.Export(this); + // delete that + std::list<UndoRedo>::iterator iter = main->end(); + iter--; + main->erase(iter); + + // reset some values before refreshing + mousedownAt_point = NULL; + pointedAt_point = NULL; + SetHighlighted ( NULL, NULL ); + ClearPointsSelection(); + RefreshDisplay(); + RefreshUndocmds(); + return true; +} + +bool ASSDrawCanvas::Undo() +{ + return UndoOrRedo( true ); +} + +bool ASSDrawCanvas::Redo() +{ + return UndoOrRedo( false ); +} + +wxString ASSDrawCanvas::GetTopUndo() +{ + if (undos.empty()) + return _T(""); + else + return undos.back().desc; +} + +wxString ASSDrawCanvas::GetTopRedo() +{ + if (redos.empty()) + return _T(""); + else + return redos.back().desc; +} + +void ASSDrawCanvas::RefreshUndocmds() +{ + _undo.Import(this, true, GenerateASS()); +} + +void ASSDrawCanvas::PrepareUndoRedo(UndoRedo& ur, bool prestage, wxString cmds, wxString desc) +{ + ur.Import(this, prestage, cmds); + ur.desc = desc; +} + +// set command and point to highlight +void ASSDrawCanvas::SetHighlighted ( DrawCmd* cmd, Point* point ) +{ + hilite_cmd = cmd; + hilite_point = point; +} + +int ASSDrawCanvas::SelectPointsWithin( int lx, int rx, int ty, int by, SELECTMODE smode ) +{ + + DrawCmdList::iterator iterate = cmds.begin(); + for (; iterate != cmds.end(); iterate++) + { + wxPoint wx = (*iterate)->m_point->ToWxPoint(); + + if (wx.x >= lx && wx.x <= rx && wx.y >= ty && wx.y <= by) + (*iterate)->m_point->isselected = (smode != DEL); + else + (*iterate)->m_point->isselected &= (smode != NEW); + + if ((*iterate)->m_point->isselected) + selected_points.insert((*iterate)->m_point); + else + selected_points.erase((*iterate)->m_point); + + PointList::iterator pnt_iterator = (*iterate)->controlpoints.begin(); + PointList::iterator end = (*iterate)->controlpoints.end(); + for (; pnt_iterator != end; pnt_iterator++) + { + wxPoint wx = (*pnt_iterator)->ToWxPoint(); + + if (wx.x >= lx && wx.x <= rx && wx.y >= ty && wx.y <= by) + (*pnt_iterator)->isselected = (smode != DEL); + else + (*pnt_iterator)->isselected &= (smode != NEW); + + if ((*pnt_iterator)->isselected) + selected_points.insert(*pnt_iterator); + else + selected_points.erase(*pnt_iterator); + } + } + + return selected_points.size(); + +} + +void ASSDrawCanvas::ClearPointsSelection() +{ + if (!selected_points.empty()) + { + PointSet::iterator piter = selected_points.begin(); + for (; piter != selected_points.end(); piter++) + { + (*piter)->isselected = false; + } + selected_points.clear(); + } +} + +SELECTMODE ASSDrawCanvas::GetSelectMode(wxMouseEvent& event) +{ + SELECTMODE smode = NEW; + bool CtrlDown = event.CmdDown(); + bool AltDown = event.AltDown(); + if (CtrlDown && !AltDown) smode = ADD; + else if (!CtrlDown && AltDown) smode = DEL; + return smode; +} + +void ASSDrawCanvas::DoDraw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx ) +{ + ASSDrawEngine::Draw_Clear( rbase ); + int ww, hh; GetClientSize(&ww, &hh); + + if (bgimg.bgbmp) + { + rasterizer.reset(); + interpolator_type interpolator(bgimg.img_mtx); + PixelFormat::AGGType ipixfmt(bgimg.ibuf); + span_gen_type spangen(ipixfmt, agg::rgba_pre(0, 0, 0), interpolator); + agg::conv_transform< agg::path_storage > bg_border(bgimg.bg_path, bgimg.path_mtx); + agg::conv_clip_polygon< agg::conv_transform< agg::path_storage > > bg_clip(bg_border); + bg_clip.clip_box(0, 0, ww, hh); + rasterizer.add_path(bg_clip); + agg::render_scanlines_aa(rasterizer, scanline, rbase, bgimg.spanalloc, spangen); + } + + ASSDrawEngine::Draw_Draw( rbase, rprim, rsolid, mtx, preview_mode? rgba_shape:rgba_shape_normal ); + + if (!preview_mode) + { + // [0, 0] + rasterizer.reset(); + agg::path_storage org_path; + org_path.move_to(0, m_frame->sizes.origincross); + org_path.line_to(0, -m_frame->sizes.origincross); + org_path.move_to(m_frame->sizes.origincross, 0); + org_path.line_to(-m_frame->sizes.origincross, 0); + agg::conv_transform< agg::path_storage > org_path_t(org_path, mtx); + agg::conv_curve< agg::conv_transform< agg::path_storage > > crosshair(org_path_t); + agg::conv_stroke< agg::conv_curve< agg::conv_transform< agg::path_storage > > > chstroke(crosshair); + rasterizer.add_path(chstroke); + rsolid.color(rgba_origin); + render_scanlines(rsolid, false); + + if (IsTransformMode() && isshapetransformable) + { + if (draw_mode == MODE_SCALEROTATE) + { + // rotation centerpoint + rasterizer.reset(); + double len = 10.0; + org_path.free_all(); + org_path.move_to(rectcenter.x - len, rectcenter.y - len); + org_path.line_to(rectcenter.x + len, rectcenter.y + len); + org_path.move_to(rectcenter.x + len, rectcenter.y - len); + org_path.line_to(rectcenter.x - len, rectcenter.y + len); + agg::conv_stroke< agg::path_storage > cstroke(org_path); + rasterizer.add_path(cstroke); + agg::ellipse circ(rectcenter.x, rectcenter.y, len, len); + agg::conv_stroke< agg::ellipse > c(circ); + rasterizer.add_path(c); + rsolid.color(rgba_origin); + render_scanlines(rsolid, false); + } + + rasterizer.reset(); + agg::path_storage org_path; + org_path.move_to(rectbound2[0].x, rectbound2[0].y); + org_path.line_to(rectbound2[1].x, rectbound2[1].y); + org_path.line_to(rectbound2[2].x, rectbound2[2].y); + org_path.line_to(rectbound2[3].x, rectbound2[3].y); + org_path.line_to(rectbound2[0].x, rectbound2[0].y); + agg::conv_stroke<agg::path_storage> chstroke(org_path); + chstroke.width(1); + rsolid.color(rgba_origin); + rasterizer.add_path(chstroke); + if (rectbound2upd != -1) + { + agg::ellipse circ(rectbound2[rectbound2upd].x, rectbound2[rectbound2upd].y, + pointsys->scale, pointsys->scale); + agg::conv_contour< agg::ellipse > c(circ); + rasterizer.add_path(c); + } + if (rectbound2upd2 != -1) + { + agg::ellipse circ(rectbound2[rectbound2upd2].x, rectbound2[rectbound2upd2].y, + pointsys->scale, pointsys->scale); + agg::conv_contour< agg::ellipse > c(circ); + rasterizer.add_path(c); + } + render_scanlines(rsolid, false); + } + else + { + // outlines + agg::conv_stroke< agg::conv_transform< agg::path_storage > > bguidestroke(*rb_path); + bguidestroke.width(1); + rsolid.color(rgba_guideline); + rasterizer.add_path(bguidestroke); + render_scanlines(rsolid); + + agg::conv_stroke< agg::conv_curve< agg::conv_transform< agg::path_storage > > > stroke(*rm_curve); + stroke.width(1); + rsolid.color(rgba_outline); + rasterizer.add_path(stroke); + render_scanlines(rsolid); + + double diameter = pointsys->scale; + double radius = diameter / 2.0; + // hilite + if (hilite_cmd && hilite_cmd->type != M) + { + rasterizer.reset(); + agg::path_storage h_path; + AddDrawCmdToAGGPathStorage(hilite_cmd, h_path, HILITE); + agg::conv_transform< agg::path_storage> h_path_trans(h_path, mtx); + agg::conv_curve< agg::conv_transform< agg::path_storage> > curve(h_path_trans); + agg::conv_dash< agg::conv_curve< agg::conv_transform< agg::path_storage > > > d(curve); + d.add_dash(10,5); + agg::conv_stroke< agg::conv_dash< agg::conv_curve< agg::conv_transform< agg::path_storage > > > > stroke(d); + stroke.width(3); + rsolid.color(rgba_outline); + rasterizer.add_path(stroke); + render_scanlines(rsolid); + } + + // m_point + rasterizer.reset(); + DrawCmdList::iterator ci = cmds.begin(); + while (ci != cmds.end()) + { + double lx = (*ci)->m_point->x() * pointsys->scale + pointsys->originx - radius; + double ty = (*ci)->m_point->y() * pointsys->scale + pointsys->originy - radius; + agg::path_storage sqp = agghelper::RectanglePath(lx, lx + diameter, ty, ty + diameter); + agg::conv_contour< agg::path_storage > c(sqp); + rasterizer.add_path(c); + ci++; + } + render_scanlines_aa_solid(rbase, rgba_mainpoint); + + // control_points + rasterizer.reset(); + ci = cmds.begin(); + while (ci != cmds.end()) + { + PointList::iterator pi = (*ci)->controlpoints.begin(); + while (pi != (*ci)->controlpoints.end()) + { + agg::ellipse circ((*pi)->x() * pointsys->scale + pointsys->originx, + (*pi)->y() * pointsys->scale + pointsys->originy, radius, radius); + agg::conv_contour< agg::ellipse > c(circ); + rasterizer.add_path(c); + pi++; + } + ci++; + } + render_scanlines_aa_solid(rbase, rgba_controlpoint); + + // selection + rasterizer.reset(); + PointSet::iterator si = selected_points.begin(); + while (si != selected_points.end()) + { + agg::ellipse circ((*si)->x() * pointsys->scale + pointsys->originx, + (*si)->y() * pointsys->scale + pointsys->originy, radius + 3, radius + 3); + agg::conv_stroke< agg::ellipse > s(circ); + rasterizer.add_path(s); + si++; + } + render_scanlines_aa_solid(rbase, rgba_selectpoint); + + // hover + if (hilite_point) + { + rasterizer.reset(); + agg::ellipse circ(hilite_point->x() * pointsys->scale + pointsys->originx, + hilite_point->y() * pointsys->scale + pointsys->originy, radius + 3, radius + 3); + agg::conv_stroke< agg::ellipse > s(circ); + s.width(2); + rasterizer.add_path(s); + render_scanlines_aa_solid(rbase, rgba_selectpoint); + + rasterizer.reset(); + agg::gsv_text t; + t.flip(true); + t.size(8.0); + wxPoint pxy = hilite_point->ToWxPoint(true); + t.start_point(pxy.x + 5, pxy.y -5 ); + t.text(wxString::Format(_T("%d,%d"), hilite_point->x(), hilite_point->y()).mb_str(wxConvUTF8)); + agg::conv_stroke< agg::gsv_text > pt(t); + pt.line_cap(agg::round_cap); + pt.line_join(agg::round_join); + pt.width(1.5); + rasterizer.add_path(pt); + rsolid.color(agg::rgba(0,0,0)); + render_scanlines(rsolid, false); + + rasterizer.reset(); + agg::path_storage sb_path; + sb_path.move_to(pxy.x, 0); + sb_path.line_to(pxy.x, hh); + sb_path.move_to(0, pxy.y); + sb_path.line_to(ww, pxy.y); + agg::conv_curve< agg::path_storage > curve(sb_path); + agg::conv_dash< agg::conv_curve< agg::path_storage > > d(curve); + d.add_dash(10,5); + agg::conv_stroke< agg::conv_dash< agg::conv_curve< agg::path_storage > > > stroke(d); + stroke.width(1); + rsolid.color(agg::rgba(0,0,0,0.5)); + rasterizer.add_path(stroke); + render_scanlines(rsolid); + } + + // selection box + if (lastDrag_left) + { + double x1 = lastDrag_left->x, y1 = lastDrag_left->y; + double x2 = dragAnchor_left->x, y2 = dragAnchor_left->y; + double lx, rx, ty, by; + if (x1 < x2) lx = x1, rx = x2; + else lx = x2, rx = x1; + if (y1 < y2) ty = y1, by = y2; + else ty = y2, by = y1; + rasterizer.reset(); + agg::path_storage sb_path = agghelper::RectanglePath(lx, rx, ty, by); + agg::conv_curve< agg::path_storage > curve(sb_path); + agg::conv_dash< agg::conv_curve< agg::path_storage > > d(curve); + d.add_dash(10,5); + agg::conv_stroke< agg::conv_dash< agg::conv_curve< agg::path_storage > > > stroke(d); + stroke.width(1.0); + rsolid.color(agg::rgba(0,0,0,0.5)); + rasterizer.add_path(stroke); + render_scanlines(rsolid); + } + } + } + + // ruler + int w, h; + GetClientSize( &w, &h ); + double scale = pointsys->scale; + double coeff = 9 / scale + 1; + int numdist = (int) floor(coeff) * 5; + { + rsolid.color(rgba_ruler_h); + rasterizer.reset(); + agg::path_storage rlr_path; + double start = pointsys->originx; + int t = - (int) floor(start / scale); + double s = (start + t * scale); + double collect = s; + int len; + + for (; s <= w; s += scale) + { + bool longtick = t % numdist == 0; + if (longtick) + { + len = 10; + agg::gsv_text txt; + txt.flip(true); + txt.size(6.0); + txt.start_point(s, 20); + txt.text(wxString::Format(_T("%d"), t).mb_str(wxConvUTF8)); + agg::conv_stroke< agg::gsv_text > pt(txt); + rasterizer.add_path(pt); + } + else + len = 5; + t++ ; + collect += scale; + if (collect > 5.0) + { + collect = 0.0; + rlr_path.move_to(s, 0); + rlr_path.line_to(s, len); + } + } + agg::conv_stroke< agg::path_storage > rlr_stroke(rlr_path); + rlr_stroke.width(1); + rasterizer.add_path(rlr_stroke); + render_scanlines(rsolid, false); + } + { + rasterizer.reset(); + rsolid.color(rgba_ruler_v); + agg::path_storage rlr_path; + double start = pointsys->originy; + int t = - (int) floor(start / scale); + double s = (start + t * scale); + double collect = 0; + int len; + + for (; s <= h; s += scale) + { + bool longtick = t % numdist == 0; + if (longtick) + { + len = 10; + agg::gsv_text txt; + txt.flip(true); + txt.size(6.0); + txt.start_point(12, s); + txt.text(wxString::Format(_T("%d"), t).mb_str(wxConvUTF8)); + agg::conv_stroke< agg::gsv_text > pt(txt); + rasterizer.add_path(pt); + } + else + len = 5; + t++ ; + collect += scale; + if (collect > 5.0) + { + collect = 0.0; + rlr_path.move_to(0, s); + rlr_path.line_to(len, s); + } + } + agg::conv_stroke< agg::path_storage > rlr_stroke(rlr_path); + rlr_stroke.width(1); + rasterizer.add_path(rlr_stroke); + render_scanlines(rsolid, false); + } + +} + +void ASSDrawCanvas::ReceiveBackgroundImageFileDropEvent(const wxString& filename) +{ + const wxChar *shortfname = wxFileName::FileName(filename).GetFullName().c_str(); + m_frame->SetStatusText(wxString::Format(_T("Loading '%s' as canvas background ..."), shortfname), 1); + wxImage img; + img.LoadFile(filename); + if (img.IsOk()) + { + SetBackgroundImage(img, filename); + } + m_frame->SetStatusText(_T("Canvas background loaded"), 1); +} + +void ASSDrawCanvas::RemoveBackgroundImage() +{ + if (bgimg.bgimg) delete bgimg.bgimg; + bgimg.bgimg = NULL; + if (bgimg.bgbmp) delete bgimg.bgbmp; + bgimg.bgbmp = NULL; + bgimg.bgimgfile = _T(""); + RefreshDisplay(); + drag_mode = DRAGMODE(); + bgimg.alpha_dlg->Show(false); + m_frame->UpdateFrameUI(); +} + +void ASSDrawCanvas::SetBackgroundImage(const wxImage& img, wxString fname, bool ask4alpha) +{ + if (bgimg.bgimg) delete bgimg.bgimg; + bgimg.bgimg = new wxImage(img); + bgimg.bgimgfile = fname; + PrepareBackgroundBitmap(bgimg.alpha); + UpdateBackgroundImgScalePosition(true); + RefreshDisplay(); + m_frame->UpdateFrameUI(); + if (ask4alpha && m_frame->behaviors.autoaskimgopac) + AskUserForBackgroundAlpha(); +} + +void ASSDrawCanvas::AskUserForBackgroundAlpha() +{ + bgimg.alpha_slider->SetValue((int) (100 - bgimg.alpha * 100)); + bgimg.alpha_dlg->Show(); + SetFocus(); +} + +void ASSDrawCanvas::PrepareBackgroundBitmap(double alpha) +{ + if (alpha >= 0.0 && alpha <= 1.0) bgimg.alpha = alpha; + if (bgimg.bgimg == NULL) return; + if (bgimg.bgbmp) delete bgimg.bgbmp; + bgimg.bgbmp = new wxBitmap(*bgimg.bgimg); + PixelData data(*bgimg.bgbmp); + wxAlphaPixelFormat::ChannelType* pd = (wxAlphaPixelFormat::ChannelType*) &data.GetPixels().Data(); + const int stride = data.GetRowStride(); + if (stride < 0) + pd += (data.GetHeight() - 1) * stride; + bgimg.ibuf.attach(pd, data.GetWidth(), data.GetHeight(), stride); + + // apply alpha + rasterizer.reset(); + unsigned w = bgimg.bgbmp->GetWidth(), h = bgimg.bgbmp->GetHeight(); + bgimg.bg_path = agghelper::RectanglePath(0, w, 0, h); + agg::conv_contour< agg::path_storage > cont(bgimg.bg_path); + rasterizer.add_path(cont); + PixelFormat::AGGType pxt(bgimg.ibuf); + RendererBase rpxt(pxt); + agg::render_scanlines_aa_solid(rasterizer, scanline, rpxt, agg::rgba(color_bg.r / 255.0, color_bg.g / 255.0, color_bg.b / 255.0, bgimg.alpha)); +} + +void ASSDrawCanvas::UpdateBackgroundImgScalePosition(bool firsttime) +{ + if (bgimg.bgbmp == NULL) return; + // transform the enclosing polygon + unsigned w = bgimg.bgbmp->GetWidth(), h = bgimg.bgbmp->GetHeight(); + bgimg.bg_path = agghelper::RectanglePath(0, w, 0, h); + // linear interpolation on image buffer + wxRealPoint center, disp; + double scale; + if (firsttime) // first time + { + bgimg.img_mtx = agg::trans_affine(); + scale = 1.0; + center = wxRealPoint(0.0, 0.0); + disp = wxRealPoint(0.0, 0.0); + bgimg.path_mtx = bgimg.img_mtx; + } + else + { + wxRealPoint d_disp(bgimg.new_disp.x - bgimg.disp.x, bgimg.new_disp.y - bgimg.disp.y); + scale = bgimg.new_scale; + disp = bgimg.disp; + center = bgimg.new_center; + if (bgimg.scale == scale) + { + bgimg.img_mtx.invert(); + bgimg.img_mtx *= agg::trans_affine_translation(d_disp.x, d_disp.y); + d_disp.x /= scale; + d_disp.y /= scale; + } + else + { + d_disp.x /= scale; + d_disp.y /= scale; + bgimg.img_mtx = agg::trans_affine(); + disp.x += (center.x - bgimg.center.x) * (1.0 - 1.0 / bgimg.scale); + disp.y += (center.y - bgimg.center.y) * (1.0 - 1.0 / bgimg.scale); + bgimg.img_mtx *= agg::trans_affine_translation(-center.x + disp.x, -center.y + disp.y); + bgimg.img_mtx *= agg::trans_affine_scaling(scale); + bgimg.img_mtx *= agg::trans_affine_translation(center.x + d_disp.x, center.y + d_disp.y); + } + bgimg.path_mtx = bgimg.img_mtx; + bgimg.img_mtx.invert(); + disp.x += d_disp.x; + disp.y += d_disp.y; + } + //update + bgimg.scale = scale; + bgimg.center = center; + bgimg.disp = disp; + bgimg.new_scale = scale; + bgimg.new_center = center; + bgimg.new_disp = disp; +} + +bool ASSDrawCanvas::GetBackgroundInfo(unsigned& w, unsigned& h, wxRealPoint& disp, double& scale) +{ + if (!HasBackgroundImage()) return false; + w = bgimg.bgbmp->GetWidth(), h = bgimg.bgbmp->GetHeight(); + double t, l; + agg::conv_transform<agg::path_storage, agg::trans_affine> trr(bgimg.bg_path, bgimg.path_mtx); + trr.rewind(0); + trr.vertex(&l, &t); + disp = wxRealPoint(l, t); + scale = bgimg.scale; + return true; +} + +void ASSDrawCanvas::UpdateNonUniformTransformation() +{ + double bound[8] = { + rectbound2[0].x, rectbound2[0].y, + rectbound2[1].x, rectbound2[1].y, + rectbound2[2].x, rectbound2[2].y, + rectbound2[3].x, rectbound2[3].y }; + agg::path_storage trans; + unsigned vertices = backupcmds.total_vertices(); + + agg::trans_bilinear trans_b(rectbound[0].x, rectbound[0].y, rectbound[2].x, rectbound[2].y, bound); + agg::conv_transform<agg::path_storage, agg::trans_bilinear> transb(backupcmds, trans_b); + transb.rewind(0); + for (int i = 0; i < vertices; i++) + { + double x, y; + transb.vertex(&x, &y); + trans.move_to(x, y); + } + + trans.rewind(0); + for (DrawCmdList::iterator iterate = cmds.begin(); iterate != cmds.end(); iterate++) + { + DrawCmd* cmd = (*iterate); + for (PointList::iterator iterate2 = cmd->controlpoints.begin(); iterate2 != cmd->controlpoints.end(); iterate2++) + { + double x, y; + trans.vertex(&x, &y); + int wx, wy; + pointsys->FromWxPoint ( wxPoint((int)x, (int)y), wx, wy ); + (*iterate2)->setXY(wx, wy); + } + double x, y; + trans.vertex(&x, &y); + int wx, wy; + pointsys->FromWxPoint ( wxPoint((int)x, (int)y), wx, wy ); + (*iterate)->m_point->setXY(wx, wy); + } + +} + +void ASSDrawCanvas::CustomOnKeyDown(wxKeyEvent &event) +{ + int keycode = event.GetKeyCode(); + double scrollamount = (event.GetModifiers() == wxMOD_CMD? 10.0:1.0); + if (event.GetModifiers() == wxMOD_SHIFT) + { + MODE d_mode = GetDrawMode(); + if ((int) d_mode > (int) MODE_ARR && (int) d_mode < (int) MODE_SCALEROTATE) + { + mode_b4_shift = d_mode; + SetDrawMode( MODE_ARR ); + m_frame->UpdateFrameUI(); + } + } + else + { + switch (keycode) + { + case WXK_PAGEUP: + ChangeZoomLevel( 1.0 /scrollamount, wxPoint( (int) pointsys->originx, (int) pointsys->originy ) ); + RefreshDisplay(); + break; + case WXK_PAGEDOWN: + ChangeZoomLevel( - 1.0 /scrollamount, wxPoint( (int) pointsys->originx, (int) pointsys->originy ) ); + RefreshDisplay(); + break; + case WXK_UP: + MoveCanvas(0.0, -scrollamount); + RefreshDisplay(); + break; + case WXK_DOWN: + MoveCanvas(0.0, scrollamount); + RefreshDisplay(); + break; + case WXK_LEFT: + MoveCanvas(-scrollamount, 0.0); + RefreshDisplay(); + break; + case WXK_RIGHT: + MoveCanvas(scrollamount, 0.0); + RefreshDisplay(); + break; + case WXK_TAB: + if (mousedownAt_point == NULL && !IsTransformMode() && cmds.size() > 0) + { + if (pointedAt_point == NULL) + { + Point *nearest = NULL; + double dist = 0.0; + DrawCmdList::iterator it = cmds.begin(); + while(it != cmds.end()) + { + wxPoint point = (*it)->m_point->ToWxPoint(); + double distance = sqrt(pow(double(point.x - mouse_point.x), 2) + pow(double(point.y - mouse_point.y), 2)); + if (nearest == NULL || distance < dist) + { + nearest = (*it)->m_point; + dist = distance; + } + PointList::iterator it2 = (*it)->controlpoints.begin(); + while (it2 != (*it)->controlpoints.end()) + { + wxPoint point = (*it2)->ToWxPoint(); + double distance = sqrt(pow((double)point.x - mouse_point.x, 2) + pow((double)point.y - mouse_point.y, 2)); + if (nearest == NULL || distance < dist) + { + nearest = (*it2); + dist = distance; + } + it2++; + } + it++; + } + if (nearest != NULL) + { + wxPoint point = nearest->ToWxPoint(); + WarpPointer(point.x, point.y); + } + } + else + { + Point *warpto = NULL; + if (pointedAt_point->type == MP && pointedAt_point->cmd_next) + if (pointedAt_point->cmd_next->controlpoints.size() > 0) + warpto = pointedAt_point->cmd_next->controlpoints.front(); + else + warpto = pointedAt_point->cmd_next->m_point; + } + else + { + PointList::iterator it = pointedAt_point->cmd_main->controlpoints.begin(); + while (*it != pointedAt_point) it++; + it++; + if (it == pointedAt_point->cmd_main->controlpoints.end()) + warpto = pointedAt_point->cmd_main->m_point; + else + warpto = *it; + } + if (warpto == NULL) + warpto = cmds.front()->m_point; + wxPoint point = warpto->ToWxPoint(); + WarpPointer(point.x, point.y); + } + } + break; + default: + event.Skip(); + } + } +} + +void ASSDrawCanvas::CustomOnKeyUp(wxKeyEvent &event) +{ + if (event.GetModifiers() != wxMOD_SHIFT && (int) mode_b4_shift > (int) MODE_ARR) + { + SetDrawMode( mode_b4_shift ); + m_frame->UpdateFrameUI(); + mode_b4_shift = MODE_ARR; + } +} + +void ASSDrawCanvas::OnAlphaSliderChanged(wxScrollEvent &event) +{ + double pos = (double) event.GetPosition(); + PrepareBackgroundBitmap(1.0 - pos / 100.0); + RefreshDisplay(); +} + +void ASSDrawCanvas::CustomOnMouseCaptureLost(wxMouseCaptureLostEvent &) +{ + if (capturemouse_left) + ProcessOnMouseLeftUp(); + + if (capturemouse_right) + ProcessOnMouseRightUp(); +} + +void UndoRedo::Import(ASSDrawCanvas *canvas, bool prestage, wxString cmds) +{ + if (prestage) + { + this->cmds = cmds; + this->backupcmds.free_all(); + this->backupcmds.concat_path(canvas->backupcmds); + for (int i = 0; i < 4; i++) + { + this->rectbound[i] = canvas->rectbound[i]; + this->rectbound2[i] = canvas->rectbound2[i]; + this->backup[i] = canvas->backup[i]; + } + this->isshapetransformable = canvas->isshapetransformable; + } + else + { + this->originx = canvas->pointsys->originx; + this->originy = canvas->pointsys->originy; + this->scale = canvas->pointsys->scale; + + this->bgimgfile = canvas->bgimg.bgimgfile; + this->bgdisp = canvas->bgimg.disp; + this->bgcenter = canvas->bgimg.center; + this->bgscale = canvas->bgimg.scale; + this->bgalpha = canvas->bgimg.alpha; + this->c1cont = canvas->PrepareC1ContData(); + this->draw_mode = canvas->draw_mode; + } +} + +void UndoRedo::Export(ASSDrawCanvas *canvas) +{ + canvas->pointsys->originx = this->originx; + canvas->pointsys->originy = this->originy; + canvas->pointsys->scale = this->scale; + canvas->ParseASS( this->cmds ); + DrawCmdList::iterator it1 = canvas->cmds.begin(); + std::vector< bool >::iterator it2 = this->c1cont.begin(); + for(; it1 != canvas->cmds.end() && it2 != this->c1cont.end(); it1++, it2++) + if (*it2 && (*it1)->type == B) + static_cast<DrawCmd_B*>(*it1)->C1Cont = true; + + if (canvas->bgimg.bgimgfile != this->bgimgfile) + { + canvas->RemoveBackgroundImage(); + if (!this->bgimgfile.IsSameAs(_T("<clipboard>")) && ::wxFileExists(this->bgimgfile)) + { + canvas->bgimg.alpha = this->bgalpha; + canvas->ReceiveBackgroundImageFileDropEvent(this->bgimgfile); + } + } + else + { + canvas->bgimg.new_scale = this->bgscale; + canvas->bgimg.new_center = this->bgcenter; + canvas->bgimg.new_disp = this->bgdisp; + canvas->bgimg.alpha = this->bgalpha; + canvas->UpdateBackgroundImgScalePosition(); + } + + canvas->draw_mode = this->draw_mode; + if (canvas->IsTransformMode()) + { + canvas->backupcmds.free_all(); + canvas->backupcmds.concat_path(this->backupcmds); + for (int i = 0; i < 4; i++) + { + canvas->rectbound[i] = this->rectbound[i]; + canvas->rectbound2[i] = this->rectbound2[i]; + canvas->backup[i] = this->backup[i]; + } + canvas->UpdateNonUniformTransformation(); + canvas->InitiateDraggingIfTransformMode(); + canvas->rectbound2upd = -1; + canvas->rectbound2upd2 = -1; + canvas->isshapetransformable = this->isshapetransformable; + } +} diff --git a/assdraw/src/canvas.hpp b/assdraw/src/canvas.hpp new file mode 100644 index 0000000000000000000000000000000000000000..aee896ee21ed93e946f3c90fc45fd6092cb22544 --- /dev/null +++ b/assdraw/src/canvas.hpp @@ -0,0 +1,304 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: canvas.hpp +// Purpose: header file for ASSDraw main canvas class +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include <vector> + +#include "engine.hpp" +#include "enums.hpp" + +#include <wx/dnd.h> +#include <wx/splitter.h> +#include <wx/clntdata.h> + +#include "agg_span_allocator.h" +#include "agg_span_interpolator_linear.h" +#include "agg_span_image_filter_rgb.h" +#include "agg_span_image_filter_rgba.h" +#include "agg_image_accessors.h" +#include "agg_conv_clip_polygon.h" + +class ASSDrawFrame; +class ASSDrawCanvas; + +struct UndoRedo +{ + wxString cmds; + wxString desc; + double originx, originy, scale; + + std::vector< bool > c1cont; + wxString bgimgfile; + wxRealPoint bgdisp, bgcenter; + double bgscale, bgalpha; + + MODE draw_mode; + agg::path_storage backupcmds; + wxRealPoint rectbound[4], rectbound2[4], backup[4]; + bool isshapetransformable; + + void Import(ASSDrawCanvas *canvas, bool prestage, wxString cmds = _T("")); + void Export(ASSDrawCanvas *canvas); + +}; + +// for multiple point selection +enum SELECTMODE { NEW, ADD, DEL }; + +class ASSDrawCanvas: public ASSDrawEngine, public wxClientData +{ +public: + ASSDrawCanvas( wxWindow *parent, ASSDrawFrame *frame, int extraflags = 0 ); + + // destructor + ~ASSDrawCanvas(); + + virtual void ResetEngine(bool addM); + virtual void SetPreviewMode( bool mode ); + virtual bool IsPreviewMode() { return preview_mode; } + virtual void ParseASS(wxString str, bool addundo = false); + + virtual void SetDrawMode( MODE mode ); + virtual MODE GetDrawMode() { return draw_mode; } + virtual bool IsTransformMode(); + virtual void SetDragMode( DRAGMODE mode ); + virtual DRAGMODE GetDragMode() { return drag_mode; } + virtual void RefreshDisplay(); + virtual bool CanZoom(); + virtual bool CanMove(); + + virtual void OnMouseMove(wxMouseEvent &event); + virtual void OnMouseLeftUp(wxMouseEvent &event); + virtual void OnMouseLeftDown(wxMouseEvent &event); + virtual void OnMouseRightUp(wxMouseEvent &event); + virtual void OnMouseRightDown(wxMouseEvent &event); + virtual void OnMouseRightDClick(wxMouseEvent &event); + virtual void OnMouseWheel(wxMouseEvent &event); + virtual void CustomOnKeyDown(wxKeyEvent &event); + virtual void CustomOnKeyUp(wxKeyEvent &event); + virtual void ChangeZoomLevel(double zoomamount, wxPoint bgzoomctr); + virtual void ChangeZoomLevelTo(double zoom, wxPoint bgzoomctr); + virtual void ChangeDrawingZoomLevel(double zoom); + virtual void ChangeBackgroundZoomLevel(double zoom, wxRealPoint newcenter); + virtual void MoveCanvas(double xamount, double yamount); + virtual void MoveCanvasOriginTo(double originx, double originy); + virtual void MoveCanvasDrawing(double xamount, double yamount); + virtual void MoveCanvasBackground(double xamount, double yamount); + virtual void OnSelect_ConvertLineToBezier(wxCommandEvent& WXUNUSED(event)); + virtual void OnSelect_ConvertBezierToLine(wxCommandEvent& WXUNUSED(event)); + virtual void OnSelect_C1ContinuityBezier(wxCommandEvent& WXUNUSED(event)); + virtual void OnSelect_Move00Here(wxCommandEvent& WXUNUSED(event)); + void OnAlphaSliderChanged(wxScrollEvent &event); + + // to replace _PointSystem() that has been made protected + double GetScale() { return pointsys->scale; } + double GetOriginX() { return pointsys->originx; } + double GetOriginY() { return pointsys->originy; } + + // undo/redo system + virtual void AddUndo( wxString desc ); + virtual bool UndoOrRedo(bool isundo); + virtual bool Undo(); + virtual bool Redo(); + virtual wxString GetTopUndo(); + virtual wxString GetTopRedo(); + virtual void RefreshUndocmds(); + + virtual bool HasBackgroundImage() { return bgimg.bgimg != NULL; } + virtual void RemoveBackgroundImage(); + virtual void ReceiveBackgroundImageFileDropEvent(const wxString& filename); + virtual void SetBackgroundImage(const wxImage& img, wxString fname = _T("<clipboard>"), bool ask4alpha = true); + virtual void PrepareBackgroundBitmap(double alpha); + virtual void AskUserForBackgroundAlpha(); + virtual bool GetBackgroundInfo(unsigned& w, unsigned& h, wxRealPoint& disp, double& scale); + + agg::rgba rgba_shape_normal, rgba_outline, rgba_guideline; + agg::rgba rgba_mainpoint, rgba_controlpoint, rgba_selectpoint; + agg::rgba rgba_origin, rgba_ruler_h, rgba_ruler_v; + +protected: + + typedef PixelFormat::AGGType::color_type color_type; + typedef agg::span_interpolator_linear<> interpolator_type; + typedef agg::span_image_filter_rgb_bilinear_clip<PixelFormat::AGGType, interpolator_type> span_gen_type; + + // The GUI window + ASSDrawFrame* m_frame; + + // highlight mechanism + DrawCmd* hilite_cmd; + Point* hilite_point; + + // mouse capture + bool capturemouse_left, capturemouse_right; + virtual void CustomOnMouseCaptureLost(wxMouseCaptureLostEvent &event); + virtual void ProcessOnMouseLeftUp(); + virtual void ProcessOnMouseRightUp(); + + // selection mechanism + PointSet selected_points; + + // if it has status bar + bool hasStatusBar; + + // some mouse readings + Point* mousedownAt_point; + Point* pointedAt_point; + Point* dblclicked_point_right; + wxPoint mouse_point; + + // The wxPoint being dragged by left button + wxPoint* dragAnchor_left; + wxPoint* lastDrag_left; + + // The wxPoint being dragged by right button + wxPoint* dragAnchor_right; + wxPoint* lastDrag_right; + + // true if the drawing origin (0, 0) is being dragged + bool dragOrigin; + + // The newest command being initialized thru dragging action + DrawCmd* newcommand; + + // the draw mode + MODE draw_mode; + DRAGMODE drag_mode; + + // holding shift key temporarily switches to drag mode (MODE_ARR) + // so we want to save the mode before the key-down to restore it on key-up + MODE mode_b4_shift; + + // true if preview mode (i.e don't draw anything except the shape itself; + // also draw the shape as closed) + bool preview_mode; + + // background image! + struct + { + agg::rendering_buffer ibuf; + wxImage *bgimg; + wxBitmap *bgbmp; + wxString bgimgfile; + agg::path_storage bg_path; + agg::span_allocator<color_type> spanalloc; + //span_gen_type spangen; + agg::trans_affine img_mtx, path_mtx; + + wxRealPoint disp, center, new_disp, new_center; + double scale, new_scale, alpha; + wxDialog* alpha_dlg; + wxSlider* alpha_slider; + } bgimg; + + // Undo/redo system (simply stores the ASS commands) + std::list<UndoRedo> undos; + std::list<UndoRedo> redos; + UndoRedo _undo; + + // last action and commands (for undo/redo system) + wxString undodesc; + + wxString oldasscmds; + + // was preview_mode + //bool was_preview_mode; + + PointSystem* _PointSystem() { return pointsys; } + + // for Undo/Redo system + virtual void PrepareUndoRedo(UndoRedo& ur, bool prestage, wxString cmds, wxString desc); + + // -------------------- points highlight/selection --------------------------- + + // set command and point to highlight + virtual void SetHighlighted ( DrawCmd* cmd, Point* point ); + + // selects all points within (lx, ty) , (rx, by) returns # of selected points + virtual int SelectPointsWithin( int lx, int rx, int ty, int by, SELECTMODE smode = NEW ); + virtual void ClearPointsSelection(); + virtual SELECTMODE GetSelectMode(wxMouseEvent &event); + + // -------------------- misc --------------------------- + + // non-uniform transformation + virtual bool InitiateDraggingIfTransformMode(); + virtual void UpdateTranformModeRectCenter(); + virtual bool GetThe4thPoint(double ox, double oy, double a1x, double a1y, double a2x, double a2y, double *x, double *y); + enum { NONE, LEFT, RIGHT } backupowner; + agg::path_storage backupcmds; + int rectbound2upd, rectbound2upd2; + wxRealPoint rectbound[4], rectbound2[4], backup[4], rectcenter; + bool isshapetransformable; + + // do the real drawing + virtual void DoDraw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx ); + + // update background image scale & position + virtual void UpdateBackgroundImgScalePosition(bool firsttime = false); + + // perform extra stuff other than calling ASSDrawEngine::ConnectSubsequentCmds + virtual void ConnectSubsequentCmds (DrawCmd* cmd1, DrawCmd* cmd2); + + // make sure the c1 continuity is followed after performing a drag-point action + virtual void EnforceC1Continuity (DrawCmd* cmd, Point* pnt); + + // after the bounding quadrangle has changed, update the shape to fill up inside it + virtual void UpdateNonUniformTransformation(); + + friend struct UndoRedo; + + DECLARE_EVENT_TABLE() +}; + +class ASSDrawFileDropTarget : public wxFileDropTarget +{ +public: + ASSDrawFileDropTarget(ASSDrawCanvas *canvas): wxFileDropTarget() + { + m_canvas = canvas; + } + + virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) + { + m_canvas->ReceiveBackgroundImageFileDropEvent(filenames.Item(0)); + return true; + } + +protected: + ASSDrawCanvas *m_canvas; + +}; diff --git a/assdraw/src/canvas_mouse.cpp b/assdraw/src/canvas_mouse.cpp new file mode 100644 index 0000000000000000000000000000000000000000..22b64a5f459c20b957478a90a3ce8094ca5b0e3d --- /dev/null +++ b/assdraw/src/canvas_mouse.cpp @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "canvas_mouse.hpp" +#include "canvas.hpp" + +DEFINE_EVENT_TYPE( wxEVT_MOUSEONCANVAS ) + + +ASSDrawMouseOnCanvasEvent::ASSDrawMouseOnCanvasEvent(const ASSDrawCanvas* canvas) + : wxNotifyEvent(), + _canvas(canvas) +{ + _data = NULL; +} + +wxEvent* ASSDrawMouseOnCanvasEvent::Clone() +{ + ASSDrawMouseOnCanvasEvent *clone = new ASSDrawMouseOnCanvasEvent(_canvas); + clone->SetData(_data); + return clone; +} + +void ASSDrawMouseOnCanvasEvent::SetData(MouseOnCanvasData *data) +{ + _data = data; +} + +MouseOnCanvasData* ASSDrawMouseOnCanvasEvent::GetData() +{ + return _data; +} diff --git a/assdraw/src/canvas_mouse.hpp b/assdraw/src/canvas_mouse.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d64011336cf8cac65fdc4bf2c67b0f20c7862bc4 --- /dev/null +++ b/assdraw/src/canvas_mouse.hpp @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "_common.hpp" +#include "enums.hpp" +#include "engine.hpp" + +#include <wx/event.h> + +struct MouseOnCanvasData +{ + MODE mode; + wxMouseEvent event; + enum { NONE, LEFT, RIGHT, BOTH } button; + + Point* mousedownAt_point; + Point* pointedAt_point; + Point* dblclicked_point_right; + + wxPoint mouse_point; + wxPoint* dragAnchor_left; + wxPoint* lastDrag_left; + wxPoint* dragAnchor_right; + wxPoint* lastDrag_right; +}; + +class ASSDrawCanvas; + +class ASSDrawMouseOnCanvasEvent : public wxNotifyEvent +{ +public: + ASSDrawMouseOnCanvasEvent(const ASSDrawCanvas* canvas); + + wxEvent* Clone(); + + void SetData(MouseOnCanvasData *data); + + MouseOnCanvasData* GetData(); + +private: + const ASSDrawCanvas* _canvas; + MouseOnCanvasData* _data; + +}; + +DECLARE_EVENT_TYPE( wxEVT_MOUSEONCANVAS, -1 ) + +typedef void (wxEvtHandler::*wxMouseOnCanvasEventFunction)(ASSDrawMouseOnCanvasEvent&); + +#define EVT_MOUSEONCANVAS(fn) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOUSEONCANVAS, -1, -1, \ + (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) \ + wxStaticCastEvent( wxMouseOnCanvasEventFunction, & fn ), (wxObject *) NULL ), + +class ASSDrawMouseOnCanvasHandler +{ + + +}; diff --git a/assdraw/src/cmd.cpp b/assdraw/src/cmd.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58668f68f287630a117fc5a7cdf36241ee1d9b84 --- /dev/null +++ b/assdraw/src/cmd.cpp @@ -0,0 +1,213 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: cmd.cpp +// Purpose: ASSDraw drawing command classes +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#include "cmd.hpp" // the header for this file +#include <wx/log.h> +// ---------------------------------------------------------------------------- +// DrawCmd_M +// ---------------------------------------------------------------------------- + +// constructor +DrawCmd_M::DrawCmd_M ( int x, int y, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = M; +} + +// to ASS drawing command +wxString DrawCmd_M::ToString() +{ + return wxString::Format(_T("m %d %d"), m_point->x(), m_point->y()); +} + + + +// ---------------------------------------------------------------------------- +// DrawCmd_L +// ---------------------------------------------------------------------------- + +// constructor +DrawCmd_L::DrawCmd_L ( int x, int y, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = L; +} + +// to ASS drawing command +wxString DrawCmd_L::ToString() +{ + return wxString::Format(_T("l %d %d"), m_point->x(), m_point->y()); +} + + + +// ---------------------------------------------------------------------------- +// DrawCmd_B +// ---------------------------------------------------------------------------- + +// constructor +DrawCmd_B::DrawCmd_B +( int x, int y, int x1, int y1, int x2, int y2, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = B; + controlpoints.push_back( new Point(x1, y1, ps, CP, this, 1) ); + controlpoints.push_back( new Point(x2, y2, ps, CP, this, 2) ); + initialized = true; + C1Cont = false; +} + +// constructor +DrawCmd_B::DrawCmd_B ( int x, int y, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = B; + initialized = false; + C1Cont = false; +} + +// initialize; generate control points +void DrawCmd_B::Init ( unsigned n ) +{ + // Ignore if this is already initted + if (initialized) return; + + wxPoint wx0 = prev->m_point->ToWxPoint(); + wxPoint wx1 = m_point->ToWxPoint(); + int xdiff = (wx1.x - wx0.x) / 3; + int ydiff = (wx1.y - wx0.y) / 3; + int xg, yg; + + // first control + m_point->pointsys->FromWxPoint( wx0.x + xdiff, wx0.y + ydiff, xg, yg ); + controlpoints.push_back( new Point( xg, yg, m_point->pointsys, CP, this, 1 ) ); + + // second control + m_point->pointsys->FromWxPoint( wx1.x - xdiff, wx1.y - ydiff, xg, yg ); + controlpoints.push_back( new Point( xg, yg, m_point->pointsys, CP, this, 2 ) ); + + initialized = true; + +} + +// to ASS drawing command +wxString DrawCmd_B::ToString() +{ + if (initialized) { + PointList::iterator iterate = controlpoints.begin(); + Point* c1 = (*iterate++); + Point* c2 = (*iterate); + return wxString::Format(_T("b %d %d %d %d %d %d"), c1->x(), c1->y(), c2->x(), c2->y(), m_point->x(), m_point->y()); + } + else + return wxString::Format(_T("b ? ? ? ? %d %d"), m_point->x(), m_point->y()); +} + + +// ---------------------------------------------------------------------------- +// DrawCmd_S +// ---------------------------------------------------------------------------- + +// constructor +DrawCmd_S::DrawCmd_S + ( int x, int y, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = S; + initialized = false; + closed = false; +} + +// constructor +DrawCmd_S::DrawCmd_S + ( int x, int y, std::vector< int > vals, PointSystem *ps, DrawCmd *prev ) + : DrawCmd ( x, y, ps, prev ) +{ + type = S; + std::vector< int >::iterator it = vals.begin(); + unsigned n = 0; + while (it != vals.end()) + { + int ix = *it; it++; + int iy = *it; it++; + n++; + //::wxLogMessage(_T("%d %d\n"), ix, iy); + controlpoints.push_back( new Point( ix, iy, ps, CP, this, n ) ); + } + + initialized = true; + closed = false; +} + +// initialize; generate control points +void DrawCmd_S::Init(unsigned n) +{ + // Ignore if this is already initted + if (initialized) return; + + wxPoint wx0 = prev->m_point->ToWxPoint(); + wxPoint wx1 = m_point->ToWxPoint(); + int xdiff = (wx1.x - wx0.x) / 3; + int ydiff = (wx1.y - wx0.y) / 3; + int xg, yg; + + // first control + m_point->pointsys->FromWxPoint( wx0.x + xdiff, wx0.y + ydiff, xg, yg ); + controlpoints.push_back( new Point( xg, yg, m_point->pointsys, CP, this, 1 ) ); + + // second control + m_point->pointsys->FromWxPoint( wx1.x - xdiff, wx1.y - ydiff, xg, yg ); + controlpoints.push_back( new Point( xg, yg, m_point->pointsys, CP, this, 2 ) ); + + initialized = true; + +} + +// to ASS drawing command +wxString DrawCmd_S::ToString() +{ + PointList::iterator iterate = controlpoints.begin(); + wxString assout = _T("s"); + for (; iterate != controlpoints.end(); iterate++) + { + if (initialized) + assout = wxString::Format(_T("%s %d %d"), assout.c_str(), (*iterate)->x(), (*iterate)->y()); + else + assout = wxString::Format(_T("%s ? ?"), assout.c_str()); + } + assout = wxString::Format(_T("%s %d %d"), assout.c_str(), m_point->x(), m_point->y()); + if (closed) assout = wxString::Format(_T("%s c"), assout.c_str()); + return assout; +} diff --git a/assdraw/src/cmd.hpp b/assdraw/src/cmd.hpp new file mode 100644 index 0000000000000000000000000000000000000000..25ef16102644b29909116ee6eb36764b752f8af9 --- /dev/null +++ b/assdraw/src/cmd.hpp @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/////////////////////////////////////////////////////////////////////////////// +// Name: cmd.hpp +// Purpose: header file for ASSDraw drawing command classes +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "engine.hpp" // include the engine header for DrawCmd +#include <vector> // ok, we use vector too + +// this header file declares the following classes +class DrawCmd_M; +class DrawCmd_L; +class DrawCmd_B; + +// The M command +class DrawCmd_M: public DrawCmd +{ +public: + // Constructor + DrawCmd_M ( int x, int y, PointSystem *ps, DrawCmd *prev ); + + // to ASS drawing command + wxString ToString(); + +}; + +// The L command +class DrawCmd_L: public DrawCmd +{ +public: + // Constructor + DrawCmd_L ( int x, int y, PointSystem *ps, DrawCmd *prev ); + + // to ASS drawing command + wxString ToString(); + +}; + +// The B command +class DrawCmd_B: public DrawCmd +{ +public: + // Constructor + DrawCmd_B ( int x, int y, int x1, int y1, int x2, int y2, PointSystem *ps, DrawCmd *prev ); + + // Special constructor where only m_point is defined + // Need to call Init() to generate the controls + DrawCmd_B ( int x, int y, PointSystem *ps, DrawCmd *prev ); + + // Init this B command; generate controlpoints + void Init ( unsigned n = 0 ); + + // to ASS drawing command + wxString ToString(); + + //special + bool C1Cont; + +}; + +// The S command +class DrawCmd_S: public DrawCmd +{ +public: + // Constructor + DrawCmd_S ( int x, int y, PointSystem *ps, DrawCmd *prev ); + + // Constructor (with points info) + DrawCmd_S ( int x, int y, std::vector< int > vals, PointSystem *ps, DrawCmd *prev ); + + // Init this S command; generate controlpoints + void Init ( unsigned n = 0 ); + + // to ASS drawing command + wxString ToString(); + + // special + bool closed; +}; + diff --git a/assdraw/src/convert.bat b/assdraw/src/convert.bat new file mode 100644 index 0000000000000000000000000000000000000000..255b89fc4aacd37b7596a3f6038883e905db3c84 --- /dev/null +++ b/assdraw/src/convert.bat @@ -0,0 +1,2 @@ +perl t-stringifier.pl agg_bcspline.h agg_conv_bcspline.h agg_vcgen_bcspline.h resource.h agg_bcspline.cpp agg_vcgen_bcspline.cpp assdraw.cpp assdraw_settings.cpp canvas.cpp canvas_mouse.cpp cmd.cpp dlgctrl.cpp engine.cpp library.cpp settings.cpp +pause \ No newline at end of file diff --git a/assdraw/src/dlgctrl.cpp b/assdraw/src/dlgctrl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..10a57d0d7b015f55f3c8f389ced793f242be0b73 --- /dev/null +++ b/assdraw/src/dlgctrl.cpp @@ -0,0 +1,375 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: dlgctrl.cpp +// Purpose: custom dialogs and controls +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#include "assdraw.hpp" + +#if !defined(__WINDOWS__) +#include "xpm/res.h" +#endif + +BEGIN_EVENT_TABLE(ASSDrawSrcTxtCtrl, wxTextCtrl) + EVT_CHAR(ASSDrawSrcTxtCtrl::CustomOnChar) + EVT_TEXT(wxID_ANY, ASSDrawSrcTxtCtrl::CustomOnText) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(ASSDrawTransformDlg, wxDialog) + EVT_COMBOBOX(-1, ASSDrawTransformDlg::OnTemplatesCombo) +END_EVENT_TABLE() + +//BEGIN_EVENT_TABLE(ASSDrawCanvasRecenterButton, wxWindow) +//END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// ASSDrawSrcTxtCtrl +// ---------------------------------------------------------------------------- + +ASSDrawSrcTxtCtrl::ASSDrawSrcTxtCtrl(wxWindow *parent, ASSDrawFrame *frame) + : wxTextCtrl(parent, wxID_ANY, _T(""), __DPDS__ , wxTE_MULTILINE ) +{ + m_frame = frame; +} + +void ASSDrawSrcTxtCtrl::CustomOnChar(wxKeyEvent &event) +{ + switch (event.GetKeyCode()) + { + case WXK_RETURN: + m_frame->UpdateASSCommandStringFromSrcTxtCtrl(GetValue()); + break; + case WXK_TAB: + break; //do nothing + default: + //m_frame->SetTitle(wxString::Format(_T("Key: %d"), event.GetKeyCode())); + event.Skip(true); + } + + //SetBackgroundColour(IsModified()? wxColour(0xFF, 0xFF, 0x99):*wxWHITE); +} + +void ASSDrawSrcTxtCtrl::CustomOnText(wxCommandEvent &event) +{ + //SetBackgroundColour(IsModified()? wxColour(0xFF, 0xFF, 0x99):*wxWHITE); +} + +// ---------------------------------------------------------------------------- +// ASSDrawTransformDlg +// ---------------------------------------------------------------------------- + +ASSDrawTransformDlg::ASSDrawTransformDlg(ASSDrawFrame* parent) + : wxDialog(parent, -1, wxString(_T("Transform"))) +{ + m_frame = parent; + + wxBoxSizer* sizer_main = new wxBoxSizer(wxVERTICAL); + this->SetSizer(sizer_main); + + wxBoxSizer* sizer_templates = new wxBoxSizer(wxHORIZONTAL); + sizer_main->Add(sizer_templates, 0, wxGROW|wxLEFT, 5); + + sizer_templates->Add(new wxStaticText( this, -1, _("Templates"), __DPDS__ , 0 ), + 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + combo_templates = new wxComboBox( this, -1, combo_templatesStrings[0], __DPDS__ , 10, combo_templatesStrings, wxCB_READONLY ); + sizer_templates->Add(combo_templates, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxFlexGridSizer* sizer_fields = new wxFlexGridSizer(3, 4, 0, 0); + sizer_main->Add(sizer_fields, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT, 5); + + int flag_txtctrl = wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL; + int flag_statictxt = wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL; + + sizer_fields->Add(new wxStaticText( this, -1, _("m11"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_m11 = new wxTextCtrl( this, -1, _T("1.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_m11, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("m12"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_m12 = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_m12, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("m21"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_m21 = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_m21, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("m22"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_m22 = new wxTextCtrl( this, -1, _T("1.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_m22, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("mx"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_mx = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_mx, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("my"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_my = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_my, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("nx"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_nx = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_nx, 0, flag_txtctrl, 5); + + sizer_fields->Add(new wxStaticText( this, -1, _("ny"), __DPDS__ , 0 ), + 0, flag_statictxt, 5); + + txtctrl_ny = new wxTextCtrl( this, -1, _T("0.0"), __DPDS__ , wxTE_RIGHT ); + sizer_fields->Add(txtctrl_ny, 0, flag_txtctrl, 5); + + wxStaticBitmap* staticbmp = new wxStaticBitmap( this, -1, wxBITMAP(transform), wxDefaultPosition, wxSize(224, 56), 0 ); + sizer_main->Add(staticbmp, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + wxStdDialogButtonSizer* sizer_stdbutt = new wxStdDialogButtonSizer; + + sizer_main->Add(sizer_stdbutt, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + wxButton* button_ok = new wxButton( this, wxID_OK, _("&OK"), __DPDS__ , 0 ); + sizer_stdbutt->AddButton(button_ok); + + wxButton* button_cancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), __DPDS__ , 0 ); + sizer_stdbutt->AddButton(button_cancel); + + sizer_stdbutt->Realize(); + + sizer_main->Fit(this); + +} + +void ASSDrawTransformDlg::OnTemplatesCombo(wxCommandEvent &event) +{ + int pos = -1; + for (int i = 0; i < combo_templatesCount; i++) + if (combo_templatesStrings[i].IsSameAs(((wxComboBox *) event.GetEventObject())->GetValue())) + { + pos = i; + break; + } + if (pos == -1) + return; + + txtctrl_m11->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f1) ); + txtctrl_m12->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f2) ); + txtctrl_m21->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f3) ); + txtctrl_m22->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f4) ); + txtctrl_mx->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f5) ); + txtctrl_my->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f6) ); + txtctrl_nx->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f7) ); + txtctrl_ny->SetValue( wxString::Format(_T("%.1f"), combo_templatesValues[pos].f8) ); +} + +void ASSDrawTransformDlg::EndModal(int retCode) +{ + if (retCode != wxID_OK) + { + wxDialog::EndModal(retCode); + return; + } + + bool ok = true; + + ok = ok && txtctrl_m11->GetValue().ToDouble( &xformvals.f1 ); + ok = ok && txtctrl_m12->GetValue().ToDouble( &xformvals.f2 ); + ok = ok && txtctrl_m21->GetValue().ToDouble( &xformvals.f3 ); + ok = ok && txtctrl_m22->GetValue().ToDouble( &xformvals.f4 ); + ok = ok && txtctrl_mx->GetValue().ToDouble( &xformvals.f5 ); + ok = ok && txtctrl_my->GetValue().ToDouble( &xformvals.f6 ); + ok = ok && txtctrl_nx->GetValue().ToDouble( &xformvals.f7 ); + ok = ok && txtctrl_ny->GetValue().ToDouble( &xformvals.f8 ); + + if (ok) + wxDialog::EndModal(wxID_OK); + else + wxMessageBox(_T("One or more values entered are not real numbers.\nPlease fix."), _T("Value error"), wxOK | wxICON_INFORMATION, m_frame); + +} + + +ASSDrawAboutDlg::ASSDrawAboutDlg(ASSDrawFrame *parent, unsigned timeout) + : wxDialog(parent, wxID_ANY, wxString(TITLE), __DPDS__ , wxSIMPLE_BORDER), time_out(timeout) +{ + SetBackgroundColour(*wxWHITE); + htmlwin = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(396, 200), wxHW_DEFAULT_STYLE | wxSIMPLE_BORDER); + htmlwin->SetPage( +_T("<html><body> \ +<p>ASSDraw3 is a tool for designing shapes to be used in ASS subtitle file. \ +<p>To add lines or curves, initiate the draw mode by clicking on the drawing tools. \ +Then, either click on empty space or drag from an existing point to add the new lines/curves. \ +Control points for Bezier curves are generated once you release the mouse button. \ +<p>To modify shapes, drag their points (squares) and control points (circles) in the drag mode. \ +<p><b>Some tips & tricks:</b> \ +<ul> \ +<li> Set background image by dragging image file from explorer onto the canvas \ +<li> Use the Shapes Library to store your drawings \ +<li> Ctrl-Z for undo, Ctrl-Y for redo \ +<li> Use your mousewheel to zoom in/out (PageUp/PageDown keys work too) \ +<li> Dragging with right mouse button moves the drawing and/or background image around. \ +<li> Double clicking with right mouse button for popup menus. \ +<li> Holding shift key while in the draw mode temporarily switches to the drag mode \ +<li> The shapes origin (coordinate [0, 0] depicted by the small cross) is draggable \ +</ul> \ +<p><b>Acknowledgements:</b> \ +<ul> \ +<li> Maxim Shemanarev <a href=\"http://www.antigrain.com\">http://www.antigrain.com</a> for his Anti-Grain Geometry (AGG) graphic toolkit. \ +<li> wxWidgets Project <a href=\"http://www.wxwidgets.org\">http://www.wxwidgets.org</a> for the ultracool GUI toolkit. \ +<li> Adrian Secord <a href=\"http://mrl.nyu.edu/~ajsecord/index.html\">http://mrl.nyu.edu/~ajsecord/index.html</a> for wxAGG, that combines AGG and wxWidgets\ +<li> jfs, ArchMageZeratul, RoRo and everyone at Aegisub's forum <a href=\"http://malakith.net/aegisub\">http://malakith.net/aegisub</a> for all suggestions and supports. \ +</ul> \ +<p>ai-chan recommends Aegisub for all your subtitle and typesetting needs! \ +</body></html>") + ); + htmlwin->Connect(wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler(ASSDrawAboutDlg::OnURL), NULL, this); + + wxFlexGridSizer *sizer = new wxFlexGridSizer(1); + sizer->AddGrowableCol(0); + //sizer->AddGrowableRow(1); + + sizer->Add(new BigStaticBitmapCtrl(this, wxBITMAP(assdraw3_), *wxWHITE, this), 1, wxEXPAND); + sizer->Add(htmlwin, 1, wxLEFT | wxRIGHT, 2); + sizer->Add(new wxStaticText(this, wxID_ANY, wxString::Format(_T("Version: %s"), VERSION)), 1, wxEXPAND | wxALL, 2); + sizer->Add(new wxButton(this, wxID_OK), 0, wxALIGN_CENTER | wxBOTTOM, 10); + SetSizer(sizer); + sizer->Layout(); + sizer->Fit(this); + + Center(); + //if (CanSetTransparent()) SetTransparent(0xCC); + + timer.SetOwner(this); + Connect(wxEVT_TIMER, wxTimerEventHandler(ASSDrawAboutDlg::OnTimeout)); + Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(ASSDrawAboutDlg::OnMouseEnterWindow)); +} + +ASSDrawAboutDlg::~ASSDrawAboutDlg() +{ + timer.Stop(); +} + +int ASSDrawAboutDlg::ShowModal() +{ + if (time_out > 0) + timer.Start(time_out * 1000, true); + return wxDialog::ShowModal(); +} + +void ASSDrawAboutDlg::OnURL(wxHtmlLinkEvent &event) +{ + wxString URL(event.GetLinkInfo().GetHref()); + if (URL.StartsWith(_T("http://"))) + ::wxLaunchDefaultBrowser(URL); + else + event.Skip(true); +} + +void ASSDrawAboutDlg::OnTimeout(wxTimerEvent& event) +{ + if (IsShown()) + EndModal(wxID_OK); +} + +void ASSDrawAboutDlg::OnMouseEnterWindow(wxMouseEvent& event) +{ + // if mouse enters this dialog, stop the timout timer + // and dialog will only close through user input + timer.Stop(); +} + +BEGIN_EVENT_TABLE(BigStaticBitmapCtrl, wxPanel) + EVT_PAINT(BigStaticBitmapCtrl::OnPaint) + EVT_MOTION (BigStaticBitmapCtrl::OnMouseMove) + EVT_LEFT_UP(BigStaticBitmapCtrl::OnMouseLeftUp) + EVT_LEFT_DOWN(BigStaticBitmapCtrl::OnMouseLeftDown) +END_EVENT_TABLE() + +BigStaticBitmapCtrl::BigStaticBitmapCtrl(wxWindow *parent, wxBitmap bmap, wxColour bgcol, wxWindow *todrag) + : wxPanel(parent, wxID_ANY) +{ + bitmap = bmap; + bgbrush = wxBrush(bgcol); + window_to_drag = todrag; + SetSize(bitmap.GetWidth(), bitmap.GetHeight()); + Refresh(); +} + +BigStaticBitmapCtrl::~BigStaticBitmapCtrl() +{ +} + +void BigStaticBitmapCtrl::OnPaint(wxPaintEvent& event) +{ + wxPaintDC dc(this); + dc.SetBackground(bgbrush); + dc.Clear(); + dc.DrawBitmap(bitmap, wxPoint(0,0)); +} + +void BigStaticBitmapCtrl::OnMouseLeftDown(wxMouseEvent &event) +{ + if (window_to_drag != NULL) + { + dragpoint = event.GetPosition(); + } + CaptureMouse(); +} + +void BigStaticBitmapCtrl::OnMouseLeftUp(wxMouseEvent &event) +{ + ReleaseMouse(); +} + +void BigStaticBitmapCtrl::OnMouseMove(wxMouseEvent &event) +{ + if (window_to_drag != NULL && event.Dragging() && HasCapture()) + { + wxPoint npoint(event.GetPosition()); + wxPoint wndpos = window_to_drag->GetScreenPosition(); + wxPoint thispos = this->GetScreenPosition(); + //ReleaseMouse(); + window_to_drag->Move(wndpos.x + npoint.x - dragpoint.x, + wndpos.y + npoint.y - dragpoint.y); + //CaptureMouse(); + if (thispos == this->GetScreenPosition()) // if this ctrl did not move when window_to_drag moved + dragpoint = npoint; + } + event.Skip(true); +} diff --git a/assdraw/src/dlgctrl.hpp b/assdraw/src/dlgctrl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b5225d181a0ff9dba99c92c868205869134529a0 --- /dev/null +++ b/assdraw/src/dlgctrl.hpp @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "_common.hpp" +#include <wx/html/htmlwin.h> +#include <wx/timer.h> + + +class ASSDrawFrame; + +class ASSDrawSrcTxtCtrl : public wxTextCtrl +{ +public: + ASSDrawSrcTxtCtrl(wxWindow *parent, ASSDrawFrame *frame); + virtual void CustomOnChar(wxKeyEvent &event); + virtual void CustomOnText(wxCommandEvent &event); + +protected: + ASSDrawFrame *m_frame; + DECLARE_EVENT_TABLE() +}; + +struct EightDouble +{ + double f1, f2, f3, f4, f5, f6, f7, f8; +}; + +class ASSDrawTransformDlg : public wxDialog +{ + +public: + ASSDrawTransformDlg(ASSDrawFrame* parent); + void OnTemplatesCombo(wxCommandEvent &event); + void EndModal(int retCode); + + ASSDrawFrame* m_frame; + wxComboBox* combo_templates; + wxTextCtrl* txtctrl_m11; + wxTextCtrl* txtctrl_m12; + wxTextCtrl* txtctrl_m21; + wxTextCtrl* txtctrl_m22; + wxTextCtrl* txtctrl_mx; + wxTextCtrl* txtctrl_my; + wxTextCtrl* txtctrl_nx; + wxTextCtrl* txtctrl_ny; + EightDouble xformvals; + + static wxString combo_templatesStrings[]; + static int combo_templatesCount; + static EightDouble combo_templatesValues[]; + + DECLARE_EVENT_TABLE() + +}; + +class ASSDrawAboutDlg : public wxDialog +{ +public: + ASSDrawAboutDlg(ASSDrawFrame *parent, unsigned timeout = 0); + virtual ~ASSDrawAboutDlg(); + virtual void OnURL(wxHtmlLinkEvent &event); + virtual int ShowModal(); + virtual void OnTimeout(wxTimerEvent& event); + virtual void OnMouseEnterWindow(wxMouseEvent& event); + +protected: + wxTimer timer; + wxHtmlWindow *htmlwin; + const unsigned time_out; +}; + +class BigStaticBitmapCtrl : public wxPanel +{ +public: + BigStaticBitmapCtrl(wxWindow *parent, wxBitmap bmap, wxColour bgcol, wxWindow *todrag = NULL); + virtual ~BigStaticBitmapCtrl(); + virtual void OnPaint(wxPaintEvent& event); + virtual void OnMouseLeftDown(wxMouseEvent &event); + virtual void OnMouseLeftUp(wxMouseEvent &event); + virtual void OnMouseMove(wxMouseEvent &event); + +protected: + wxBitmap bitmap; + wxBrush bgbrush; + wxWindow *window_to_drag; + wxPoint dragpoint, wndpos; + + DECLARE_EVENT_TABLE() +}; diff --git a/assdraw/src/engine.cpp b/assdraw/src/engine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f78fe5f788017c69e7ac97635dbc24dcd43f490 --- /dev/null +++ b/assdraw/src/engine.cpp @@ -0,0 +1,749 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: engine.cpp +// Purpose: ASSDraw drawing engine +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#include "engine.hpp" // the header +#include "cmd.hpp" // we need the drawing command classes declaration +#include <wx/tokenzr.h> // we use string tokenizer +#include <vector> // ok, we use vector too +#include <stdio.h> +#include <algorithm> + + + +// ---------------------------------------------------------------------------- +// Point +// ---------------------------------------------------------------------------- + +// constructor +Point::Point ( int _x, int _y, PointSystem* ps, POINTTYPE t, DrawCmd* cmd, unsigned n ) +{ + x_ = _x; + y_ = _y; + pointsys = ps; + cmd_main = cmd; + cmd_next = NULL; + type = t; + isselected = false; + num = n; +} + +// setters +void Point::setXY( int _x, int _y) +{ + x_ = _x; + y_ = _y; +} + +// simply returns true if px and py are the coordinate values +bool Point::IsAt( int px, int py ) +{ + return (x_ == px && y_ == py ); +} + +// convert this point to wxPoint using scale and originx, originy +wxPoint Point::ToWxPoint ( bool useorigin ) +{ + if (useorigin) + return pointsys->ToWxPoint( x_, y_ ); + else + return *(new wxPoint(x_ * (int) pointsys->scale, y_ * (int) pointsys->scale )); +} + +// check if wxpoint is nearby this point +bool Point::CheckWxPoint ( wxPoint wxpoint ) +{ + wxPoint p = ToWxPoint(); + int cx, cy; + pointsys->FromWxPoint( wxpoint, cx, cy ); + //delete &p; + return (x_ == cx && y_ == cy ); +} + + + +// ---------------------------------------------------------------------------- +// DrawCmd +// ---------------------------------------------------------------------------- + +// constructor +DrawCmd::DrawCmd ( int x, int y, PointSystem *ps, DrawCmd *pv ) +{ + m_point = new Point ( x, y, ps, MP, this ); + m_point->cmd_main = this; + prev = pv; + dobreak = false; + invisible = false; +} + +// destructor +DrawCmd::~DrawCmd ( ) +{ + if (m_point) + delete m_point; + for (PointList::iterator iter_cpoint = controlpoints.begin(); + iter_cpoint != controlpoints.end(); iter_cpoint++) + delete (*iter_cpoint); +} + + + +// ---------------------------------------------------------------------------- +// ASSDrawEngine +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(ASSDrawEngine, GUI::AGGWindow) + EVT_PAINT (ASSDrawEngine::OnPaint) +END_EVENT_TABLE() + +// constructor +ASSDrawEngine::ASSDrawEngine( wxWindow *parent, int extraflags ) + : GUI::AGGWindow(parent, -1, wxDefaultPosition, wxDefaultSize, + wxNO_FULL_REPAINT_ON_RESIZE | extraflags ) +{ + pointsys = new PointSystem(1, 0, 0) ; + refresh_called = false; + fitviewpoint_hmargin = 10; + fitviewpoint_vmargin = 10; + setfitviewpoint = false; + rgba_shape = agg::rgba(0,0,1); + color_bg = PixelFormat::AGGType::color_type(255, 255, 255); + drawcmdset = _T("m n l b s p c _"); //the spaces and underscore are in there for a reason, guess? + ResetEngine(); +} + +ASSDrawEngine::~ASSDrawEngine() +{ + ResetEngine ( false ); + //delete pointsys; +} + +// parse ASS draw commands; returns the number of parsed commands +int ASSDrawEngine::ParseASS ( wxString str ) +{ + ResetEngine( false ); + str.Replace(_T("\t"), _T("")); + str.Replace(_T("\r"), _T("")); + str.Replace(_T("\n"), _T("")); + str = str.Lower() + _T(" _ _"); + // we don't use regex because the pattern is too simple + wxStringTokenizer tkz( str, _T(" ") ); + wxString currcmd(_T("")); + std::vector<int> val; + wxString token; + long tmp_int; + + bool n_collected = false; + DrawCmd_S *s_command = NULL; + wxPoint tmp_n_pnt; + + while ( tkz.HasMoreTokens() ) + { + token = tkz.GetNextToken(); + + if ( drawcmdset.Find(token) > -1 ) + { + bool done; + + do { + done = true; + + // N + if (currcmd.IsSameAs(_T("n")) && val.size() >= 2) + { + tmp_n_pnt.x = val[0], tmp_n_pnt.y = val[1]; + n_collected = true; + } + else if(n_collected) + { + AppendCmd ( L, tmp_n_pnt.x, tmp_n_pnt.y ); + n_collected = false; + } + + if (s_command != NULL) + { + bool ends = true; + if (currcmd.IsSameAs(_T("p"))&& val.size() >= 2) + { + s_command->m_point->type = CP; + s_command->m_point->num = s_command->controlpoints.size() + 1; + s_command->controlpoints.push_back(s_command->m_point); + s_command->m_point = new Point(val[0], val[1], pointsys, MP, s_command); + ends = false; + } + else if (currcmd.IsSameAs(_T("c"))) + s_command->closed = true; + + if (ends) + { + AppendCmd(s_command); + s_command = NULL; + } + } + + // M + if (currcmd.IsSameAs(_T("m")) && val.size() >= 2) + AppendCmd ( M, val[0], val[1] ); + + // L + if (currcmd.IsSameAs(_T("l")) && val.size() >= 2) + { + AppendCmd ( L, val[0], val[1] ); + val.erase(val.begin(), val.begin()+2); + // L is greedy + if (val.size() >= 2) + done = false; + } + + // B + if (currcmd.IsSameAs(_T("b")) && val.size() >= 6) + { + AppendCmd ( new DrawCmd_B(val[4], val[5], val[0], val[1], + val[2], val[3], pointsys, LastCmd()) ); + val.erase(val.begin(), val.begin()+6); + // so is B + if (val.size() >= 6) + done = false; + } + + // S + if (currcmd.IsSameAs(_T("s")) && val.size() >= 6) + { + int num = (val.size() / 2) * 2; + std::vector<int> val2; + int i = 0; + for (; i < num - 2; i++) + val2.push_back(val[i]); + + s_command = new DrawCmd_S(val[num - 2], val[num - 1], val2, pointsys, LastCmd()); + } + // more to come later + } while (!done); + + val.clear(); + currcmd = token; + } + else if (token.ToLong( &tmp_int )) + { + val.push_back( (int) tmp_int ); + } + } + + return (int) cmds.size(); +} + +// generate ASS draw commands +wxString ASSDrawEngine::GenerateASS ( ) +{ + wxString output = _T(""); + for (DrawCmdList::iterator iterate = cmds.begin(); iterate != cmds.end(); iterate++) + output = output + (*iterate)->ToString() + _T(" "); + return output; +} + +// reset; delete all points and add a new M(0,0) +void ASSDrawEngine::ResetEngine() +{ + ResetEngine(true); +} + +// reset; delete all points and add a new M(0,0) if addM == true +void ASSDrawEngine::ResetEngine( bool addM ) +{ + for (DrawCmdList::iterator iterate = cmds.begin(); iterate != cmds.end(); iterate++) + delete (*iterate); + cmds.clear(); + if (addM) AppendCmd( M, 0, 0 ); +} + +// Create draw command of type 'type' and m_point (x, y), append to the +// list and return it +DrawCmd* ASSDrawEngine::AppendCmd ( CMDTYPE type, int x, int y ) +{ + + // use a variation of this method + return AppendCmd( NewCmd( type, x, y ) ); +} + +// Append draw command +DrawCmd* ASSDrawEngine::AppendCmd ( DrawCmd* cmd ) +{ + // no NULL command! + if (cmd == NULL) return NULL; + + // set dependency of this command on the m_point of the last command + if (!cmds.empty()) + ConnectSubsequentCmds( cmds.back(), cmd ); + else + { + // since this is the first command, if it's not an M make it into one + if (cmd->type != M) + cmd = NewCmd( M, cmd->m_point->x(), cmd->m_point->y() ); + ConnectSubsequentCmds( NULL, cmd ); + } + // put it in the list + cmds.push_back( cmd ); + + return cmd; +} + +// create draw command of type 'type' and m_point (x, y), insert to the +// list after the _cmd and return it +DrawCmd* ASSDrawEngine::InsertCmd ( CMDTYPE type, int x, int y, DrawCmd* _cmd ) +{ + // prepare the new DrawCmd + DrawCmd* c = NewCmd( type, x, y ); + + // use a variation of this method + InsertCmd( c, _cmd ); + + return NULL; +} + +// insert draw command cmd after _cmd +void ASSDrawEngine::InsertCmd ( DrawCmd* cmd, DrawCmd* _cmd ) +{ + DrawCmdList::iterator iterate = cmds.begin(); + for (; iterate != cmds.end() && *iterate != _cmd; iterate++) + { + // do nothing + } + + if (iterate == cmds.end()) + { + AppendCmd( cmd ); + } + else + { + iterate++; + if (iterate != cmds.end()) + { + ConnectSubsequentCmds( cmd, (*iterate) ); + } + cmds.insert( iterate, cmd ); + ConnectSubsequentCmds( _cmd, cmd ); + } +} + +DrawCmd* ASSDrawEngine::NewCmd ( CMDTYPE type, int x, int y ) +{ + DrawCmd* c = NULL; + + switch (type) + { + case M: + c = new DrawCmd_M(x, y, pointsys, LastCmd()); + break; + case L: + c = new DrawCmd_L(x, y, pointsys, LastCmd()); + break; + case B: + c = new DrawCmd_B(x, y, pointsys, LastCmd()); + break; + case S: + c = new DrawCmd_S(x, y, pointsys, LastCmd()); + break; + } + return c; +} + +// returns the iterator for the list +DrawCmdList::iterator ASSDrawEngine::Iterator ( ) +{ + return cmds.begin(); +} + +// returns the 'end' iterator for the list +DrawCmdList::iterator ASSDrawEngine::IteratorEnd ( ) +{ + return cmds.end(); +} + +// returns the last command in the list +DrawCmd* ASSDrawEngine::LastCmd () +{ + if (cmds.size() == 0) + return NULL; + else + return cmds.back(); +} + +// move all points by relative amount of x, y coordinates +void ASSDrawEngine::MovePoints ( int x, int y ) +{ + DrawCmdList::iterator iterate = cmds.begin(); + PointList::iterator iterate2; + + for (; iterate != cmds.end(); iterate++) + { + (*iterate)->m_point->setXY( (*iterate)->m_point->x() + x, (*iterate)->m_point->y() + y ); + for (iterate2 = (*iterate)->controlpoints.begin(); + iterate2 != (*iterate)->controlpoints.end(); iterate2++) + { + (*iterate2)->setXY( (*iterate2)->x() + x, (*iterate2)->y() + y ); + } + } +} + +// transform all points using the calculation: +// | (m11) (m12) | x | (x - mx) | + | nx | +// | (m21) (m22) | | (y - my) | | ny | +void ASSDrawEngine::Transform( float m11, float m12, float m21, float m22, + float mx, float my, float nx, float ny ) +{ + DrawCmdList::iterator iterate = cmds.begin(); + PointList::iterator iterate2; + float x, y; + for (; iterate != cmds.end(); iterate++) + { + x = ((float) (*iterate)->m_point->x()) - mx; + y = ((float) (*iterate)->m_point->y()) - my; + (*iterate)->m_point->setXY((int) (x * m11 + y * m12 + nx), (int) (x * m21 + y * m22 + ny) ); + for (iterate2 = (*iterate)->controlpoints.begin(); + iterate2 != (*iterate)->controlpoints.end(); iterate2++) + { + x = ((float) (*iterate2)->x()) - mx; + y = ((float) (*iterate2)->y()) - my; + (*iterate2)->setXY((int) (x * m11 + y * m12 + nx), (int) (x * m21 + y * m22 + ny) ); + } + } +} + +// returns some DrawCmd if its m_point = (x, y) +DrawCmd* ASSDrawEngine::PointAt ( int x, int y ) +{ + DrawCmd* c = NULL; + DrawCmdList::iterator iterate = cmds.begin(); + + for (; iterate != cmds.end(); iterate++) + { + if ( (*iterate)->m_point->IsAt( x, y ) ) + c = (*iterate); + } + + //delete &iterate; + + return c; +} + +// returns some DrawCmd if one of its control point = (x, y) +// also set &point to refer to that control point +DrawCmd* ASSDrawEngine::ControlAt ( int x, int y, Point* &point ) +{ + DrawCmd* c = NULL; + point = NULL; + DrawCmdList::iterator cmd_iterator = cmds.begin(); + PointList::iterator pnt_iterator; + PointList::iterator end; + + for (; cmd_iterator != cmds.end(); cmd_iterator++) + { + pnt_iterator = (*cmd_iterator)->controlpoints.begin(); + end = (*cmd_iterator)->controlpoints.end(); + for (; pnt_iterator != end; pnt_iterator++) + { + if ( (*pnt_iterator)->IsAt( x, y ) ) + { + c = (*cmd_iterator); + point = (*pnt_iterator); + } + } + } + + return c; +} + +// attempts to delete a commmand, returns true|false if successful|fail +bool ASSDrawEngine::DeleteCommand ( DrawCmd* cmd ) +{ + + DrawCmdList::iterator iterate = cmds.begin(); + // can't delete the first command without deleting other commands first + if ( cmd == (*iterate) && cmds.size() > 1) return false; + + DrawCmd* lastiter = NULL; + + for (; iterate != cmds.end(); iterate++) + { + if ( cmd == (*iterate) ) + { + iterate++; + DrawCmd* nxt = (iterate != cmds.end()? (*iterate):NULL); + ConnectSubsequentCmds( lastiter, nxt ); + iterate--; + cmds.erase( iterate ); + delete cmd; + break; + } + else + lastiter = (*iterate); + } + + return true; +} + +// set stuff to connect two drawing commands cmd1 and cmd2 such that +// cmd1 comes right before cmd2 +void ASSDrawEngine::ConnectSubsequentCmds (DrawCmd* cmd1, DrawCmd* cmd2) +{ + if (cmd1 != NULL) + { + cmd1->m_point->cmd_next = cmd2; + } + + if (cmd2 != NULL) + { + cmd2->prev = cmd1; + } +} + +void ASSDrawEngine::RefreshDisplay() +{ + if (!refresh_called) + { + Refresh(); + refresh_called = true; + } +} + +void ASSDrawEngine::OnPaint(wxPaintEvent& event) +{ + draw(); + onPaint(event); + if (setfitviewpoint) + { + FitToViewPoint( fitviewpoint_hmargin, fitviewpoint_vmargin ); + setfitviewpoint = false; + RefreshDisplay(); + } +} + +void ASSDrawEngine::draw() +{ + refresh_called = false; + + PixelFormat::AGGType pixf(rBuf); + RendererBase rbase(pixf); + RendererPrimitives rprim(rbase); + RendererSolid rsolid(rbase); + + agg::trans_affine mtx; + ConstructPathsAndCurves(mtx, rm_path, rb_path, rm_curve); + + rasterizer.reset(); + update_rendered_bound_coords(true); + DoDraw(rbase, rprim, rsolid, mtx); + + delete rm_path, rb_path, rm_curve; +} + +void ASSDrawEngine::ConstructPathsAndCurves(agg::trans_affine& mtx, + trans_path*& _rm_path, trans_path*& _rb_path, agg::conv_curve<trans_path>*& _rm_curve) +{ + mtx *= agg::trans_affine_scaling(pointsys->scale); + mtx *= agg::trans_affine_translation(pointsys->originx, pointsys->originy); + + m_path.remove_all(); + b_path.remove_all(); + + DrawCmdList::iterator ci = cmds.begin(); + while (ci != cmds.end()) + { + AddDrawCmdToAGGPathStorage(*ci, m_path); + AddDrawCmdToAGGPathStorage(*ci, b_path, CTRL_LN); + ci++; + } + _rm_path = new trans_path(m_path, mtx); + _rb_path = new trans_path(b_path, mtx); + _rm_curve = new agg::conv_curve<trans_path>(*rm_path); +} + +void ASSDrawEngine::DoDraw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx ) +{ + Draw_Clear( rbase ); + Draw_Draw( rbase, rprim, rsolid, mtx, rgba_shape ); +} + +void ASSDrawEngine::Draw_Clear( RendererBase& rbase ) +{ + rbase.clear(color_bg); +} + +void ASSDrawEngine::Draw_Draw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx, agg::rgba color ) +{ + agg::conv_contour< agg::conv_curve< agg::conv_transform< agg::path_storage > > > contour(*rm_curve); + rasterizer.add_path(contour); + render_scanlines_aa_solid(rbase, color); +} + +void ASSDrawEngine::AddDrawCmdToAGGPathStorage(DrawCmd* cmd, agg::path_storage& path, DRAWCMDMODE mode) +{ + if (mode == HILITE && cmd->prev) + path.move_to(cmd->prev->m_point->x(), cmd->prev->m_point->y()); + + switch(cmd->type) + { + case M: + path.move_to(cmd->m_point->x(),cmd->m_point->y()); + break; + + case B: + if (cmd->initialized) + { + //path.move_to(cmd->prev->m_point->x(),cmd->prev->m_point->y()); + PointList::iterator iterate = cmd->controlpoints.begin(); + int x[2], y[2]; + x[0] = (*iterate)->x(); + y[0] = (*iterate)->y(); + iterate++; + x[1] = (*iterate)->x(); + y[1] = (*iterate)->y(); + path.curve4(x[0], y[0], x[1], y[1], cmd->m_point->x(),cmd->m_point->y()); + break; + } + + case L: + if (mode == CTRL_LN) + path.move_to(cmd->m_point->x(),cmd->m_point->y()); + else + path.line_to(cmd->m_point->x(),cmd->m_point->y()); + break; + + case S: + unsigned np = cmd->controlpoints.size(); + agg::pod_array<double> m_polygon(np * 2); + unsigned _pn = 0; + PointList::iterator iterate = cmd->controlpoints.begin(); + while (iterate != cmd->controlpoints.end()) + { + m_polygon[_pn] = (*iterate)->x(); _pn++; + m_polygon[_pn] = (*iterate)->y(); _pn++; + iterate++; + } + //m_polygon[_pn++] = cmd->m_point->x(); + //m_polygon[_pn++] = cmd->m_point->y(); + //path.move_to(cmd->prev->m_point->x(),cmd->prev->m_point->y()); + if (mode == CTRL_LN) + { + _pn = 0; + while (_pn < np * 2) + { + path.line_to((int) m_polygon[_pn],(int) m_polygon[_pn + 1]); + _pn += 2; + } + path.line_to(cmd->m_point->x(), cmd->m_point->y()); + } + else + { + //path.line_to((int) m_polygon[0],(int) m_polygon[1]); + aggpolygon poly(&m_polygon[0], np, false, false); + agg::conv_bcspline<agg::simple_polygon_vertex_source> bspline(poly); + bspline.interpolation_step(0.01); + agg::path_storage npath; + npath.join_path(bspline); + path.join_path(npath); + if (mode == HILITE) + path.move_to((int) m_polygon[np * 2 - 2], (int) m_polygon[np * 2 - 1] ); + path.line_to(cmd->m_point->x(), cmd->m_point->y()); + } + break; + } + +} + +void ASSDrawEngine::render_scanlines_aa_solid(RendererBase& rbase, agg::rgba rgba, bool affectboundaries) +{ + agg::render_scanlines_aa_solid(rasterizer, scanline, rbase, rgba); + if (affectboundaries) update_rendered_bound_coords(); +} + +void ASSDrawEngine::render_scanlines(RendererSolid& rsolid, bool affectboundaries) +{ + agg::render_scanlines(rasterizer, scanline, rsolid); + if (affectboundaries) update_rendered_bound_coords(); +} + +void ASSDrawEngine::update_rendered_bound_coords(bool rendered_fresh) +{ + int min_x = rasterizer.min_x(); + int min_y = rasterizer.min_y(); + int max_x = rasterizer.max_x(); + int max_y = rasterizer.max_y(); + if (min_x < rendered_min_x || rendered_fresh) rendered_min_x = min_x; + if (min_y < rendered_min_y || rendered_fresh) rendered_min_y = min_y; + if (max_x > rendered_max_x || rendered_fresh) rendered_max_x = max_x; + if (max_y > rendered_max_y || rendered_fresh) rendered_max_y = max_y; +} + +void ASSDrawEngine::FitToViewPoint(int hmargin, int vmargin) +{ + wxSize v = GetClientSize(); + double wide = rendered_max_x - rendered_min_x; + double high = rendered_max_y - rendered_min_y; + double widthratio = (double) (v.x - hmargin * 2) / wide; + double heightratio = (double) (v.y - vmargin * 2) / high; + double ratio = (widthratio < heightratio? widthratio:heightratio); + pointsys->scale = pointsys->scale * ratio; + if (pointsys->scale < 0.01) pointsys->scale = 0.01; + double new_min_x = pointsys->originx + (rendered_min_x - pointsys->originx) * ratio; + double new_max_x = pointsys->originx + (rendered_max_x - pointsys->originx) * ratio; + pointsys->originx += (v.x - new_max_x + new_min_x) / 2 - new_min_x; + double new_min_y = pointsys->originy + (rendered_min_y - pointsys->originy) * ratio; + double new_max_y = pointsys->originy + (rendered_max_y - pointsys->originy) * ratio; + pointsys->originy += (v.y - new_max_y + new_min_y) / 2 - new_min_y; + RefreshDisplay(); +} + +void ASSDrawEngine::SetFitToViewPointOnNextPaint(int hmargin, int vmargin) +{ + if (vmargin >= 0) fitviewpoint_vmargin = vmargin; + if (hmargin >= 0) fitviewpoint_hmargin = hmargin; + setfitviewpoint = true; +} + +std::vector< bool > ASSDrawEngine::PrepareC1ContData() +{ + std::vector< bool > out; + for (DrawCmdList::iterator it = cmds.begin(); it != cmds.end(); it++) + { + bool c1 = false; + if ((*it)->type == B) + { + DrawCmd_B *cmdb = static_cast<DrawCmd_B *>(*it); + c1 = cmdb->C1Cont; + } + out.push_back(c1); + } + return out; +} diff --git a/assdraw/src/engine.hpp b/assdraw/src/engine.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b730ec6fcc2f996e98af4fd2b6785598901ee78a --- /dev/null +++ b/assdraw/src/engine.hpp @@ -0,0 +1,406 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: engine.hpp +// Purpose: header file for ASSDraw drawing engine +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "_common.hpp" + +// we use these 2 standard libraries +#include <math.h> +#include <list> +#include <set> +#include <vector> + +// agg support +#include "wxAGG/AGGWindow.h" +#include "agg_color_rgba.h" +#include "agg_rasterizer_scanline_aa.h" +#include "agg_scanline_p.h" +#include "agg_renderer_base.h" +#include "agg_renderer_primitives.h" +#include "agg_renderer_scanline.h" +#include "agg_path_storage.h" +#include "agg_curves.h" +#include "agg_conv_curve.h" +#include "agg_conv_contour.h" +#include "agg_conv_stroke.h" +#include "agg_conv_bcspline.h" +#include "agg_math.h" + +#define DEFAULT_SCALE 10 + +// this header file declare the following classes +class DrawEngine; +class Point; +class PointSystem; +class DrawCmd; + +typedef std::list<DrawCmd*> DrawCmdList; +typedef std::list<Point*> PointList; +typedef std::set<Point*> PointSet; + +// Command type +enum CMDTYPE +{ + M = 0, + N = 1, + L = 2, + B = 3, + S = 4, + P = 5, + C = 6 +}; + +// Point type +enum POINTTYPE +{ + MP, // main point + CP // control point +}; + +// A PointSystem is a centralized entity holding the parameters: +// scale, originx and originy, all of which are needed by Point +class PointSystem +{ +public: + double scale, originx, originy; + + PointSystem ( double sc = 1.0, double origx = 0.0, double origy = 0.0 ) + { Set( sc, origx, origy ); } + + // set scale, originx and originy; + void Set( double sc, double origx, double origy ) + { scale = sc, originx = origx, originy = origy; } + + wxRealPoint ToWxRealPoint ( double x, double y ) + { return wxRealPoint( originx + x * scale, originy + y * scale ); } + + // given drawing command coordinates returns the wxPoint on the GUI + wxPoint ToWxPoint ( double x, double y ) + { return wxPoint( (int) (originx + x * scale), (int) (originy + y * scale) ); } + + // given wxPoint on the GUI returns the nearest drawing command coords + void FromWxPoint ( int wxpx, int wxpy, int &x, int &y ) + { + x = int( floor( ((double) wxpx - originx) / scale + 0.5 ) ); + y = int( floor( ((double) wxpy - originy) / scale + 0.5 ) ); + } + + // given wxPoint on the GUI returns the nearest drawing command coords + void FromWxPoint ( wxPoint wxp, int &x, int &y ) + { + FromWxPoint( wxp.x, wxp.y, x, y ); + } +}; + +// The point class +// note: this actually refers to the x,y-coordinate in drawing commands, +// not the coordinate in the GUI +class Point +{ +public: + POINTTYPE type; + PointSystem *pointsys; + + // drawing commands that depend on this point + DrawCmd* cmd_main; + DrawCmd* cmd_next; + bool isselected; + unsigned num; + + // constructor + //Point ( ) { cmd_main = NULL; cmd_next = NULL; } + + // constructor + Point ( int _x, int _y, PointSystem* ps, POINTTYPE t, DrawCmd* cmd, unsigned n = 0 ); + + // getters + int x() { return x_; } + + int y() { return y_; } + + //set x and y + void setXY( int _x, int _y); + + // simply returns true if px and py are the coordinate values + bool IsAt( int px, int py ); + + // convert this point to wxPoint using scale and originx, originy + wxPoint ToWxPoint () { return ToWxPoint(true); } + + // convert this point to wxPoint using scale; + // also use originx and originy if useorigin = true + wxPoint ToWxPoint (bool useorigin); + + // check if wxpoint is nearby this point + bool CheckWxPoint ( wxPoint wxpoint ); + +private: + int x_, y_; + +}; + +// The base class for all draw commands +class DrawCmd +{ +public: + CMDTYPE type; + + // main point (almost every command has one) + // for B and S it's the last (destination) point + Point* m_point; + + // other points than the main point + // subclasses must populate this list even if they define + // new variables for other points + PointList controlpoints; + + // Linked list feature + DrawCmd *prev; + + // Must set to true if the next command should NOT utilize this command + // for the drawing + bool dobreak; + + // Set to true if invisible m_point (not drawn) + bool invisible; + + // true if this DrawCmd has been initialized with Init(), false otherwise + // (initialized means that the control points have been generated) + bool initialized; + + // ----------------------------------------------------------- + // Constructor(s) + DrawCmd ( int x, int y, PointSystem *ps, DrawCmd *pv ); + + // Destructor + virtual ~DrawCmd (); + + // Init the draw command (for example to generate the control points) + virtual void Init(unsigned n = 0) { initialized = true; } + + virtual wxString ToString() { return wxT(""); } + +}; + +class ASSDrawEngine: public GUI::AGGWindow +{ +public: + ASSDrawEngine( wxWindow *parent, int extraflags = 0 ); + + // destructor + ~ASSDrawEngine(); + + virtual void SetDrawCmdSet(wxString set) { drawcmdset = set; } + + virtual void ResetEngine(); + virtual void ResetEngine(bool addM); + virtual void RefreshDisplay(); + + void FitToViewPoint(int hmargin, int vmargin); + void SetFitToViewPointOnNextPaint(int hmargin = -1, int vmargin = -1); + + PointSystem* _PointSystem() { return pointsys; } + + // ASS draw commands; returns the number of parsed commands + virtual int ParseASS ( wxString str ); + // generate ASS draw commands + virtual wxString GenerateASS ( ); + + // drawing + virtual void OnPaint(wxPaintEvent &event); + + // -------------------- adding new commands ---------------------------- + + // create draw command of type 'type' and m_point (x, y), append to the + // list and return it + virtual DrawCmd* AppendCmd ( CMDTYPE type, int x, int y ); + + // append draw command + virtual DrawCmd* AppendCmd ( DrawCmd* cmd ); + + // create draw command of type 'type' and m_point (x, y), insert to the + // list after the _cmd and return it + virtual DrawCmd* InsertCmd ( CMDTYPE type, int x, int y, DrawCmd* _cmd ); + + // insert draw command cmd after _cmd + virtual void InsertCmd ( DrawCmd* cmd, DrawCmd* _cmd ); + + // Create new DrawCmd + DrawCmd* NewCmd ( CMDTYPE type, int x, int y ); + + // -------------------- read/modify commands --------------------------- + + // returns the iterator for the list + virtual DrawCmdList::iterator Iterator ( ); + + // returns the 'end' iterator for the list + virtual DrawCmdList::iterator IteratorEnd ( ); + + // returns the last command in the list + virtual DrawCmd* LastCmd (); + + // returns the total number of commands in the list + //virtual int CmdCount () { return cmds.size(); } + + // move all points by relative amount of x, y coordinates + virtual void MovePoints ( int x, int y ); + + // transform all points using the calculation: + // | (m11) (m12) | x | (x - mx) | + | nx | + // | (m21) (m22) | | (y - my) | | ny | + virtual void Transform( float m11, float m12, float m21, float m22, + float mx, float my, float nx, float ny ); + + // returns some DrawCmd if its m_point = (x, y) + virtual DrawCmd* PointAt ( int x, int y ); + + // returns some DrawCmd if one of its control point = (x, y) + // also set &point to refer to that control point + virtual DrawCmd* ControlAt ( int x, int y, Point* &point ); + + // attempts to delete a commmand, returns true|false if successful|fail + virtual bool DeleteCommand ( DrawCmd* cmd ); + + agg::rgba rgba_shape; + PixelFormat::AGGType::color_type color_bg; + +protected: + /// The AGG base renderer + typedef agg::renderer_base<PixelFormat::AGGType> RendererBase; + /// The AGG primitives renderer + typedef agg::renderer_primitives<RendererBase> RendererPrimitives; + /// The AGG solid renderer + typedef agg::renderer_scanline_aa_solid<RendererBase> RendererSolid; + + enum DRAWCMDMODE { + NORMAL, + CTRL_LN, + HILITE + }; + + DrawCmdList cmds; + wxString drawcmdset; + + PointSystem* pointsys; + + // for FitToViewPoint feature + bool setfitviewpoint; + int fitviewpoint_vmargin, fitviewpoint_hmargin; + + // AGG + agg::rasterizer_scanline_aa<> rasterizer; ///< Scanline rasterizer + agg::scanline_p8 scanline; ///< Scanline container + void render_scanlines_aa_solid(RendererBase& rbase, agg::rgba rbga, bool affectboundaries = true); + void render_scanlines(RendererSolid& rsolid, bool affectboundaries = true); + int rendered_min_x, rendered_min_y, rendered_max_x, rendered_max_y; //bounding coord of rendered shapes + void update_rendered_bound_coords(bool rendered_fresh = false); + + typedef agg::conv_transform<agg::path_storage> trans_path; + agg::path_storage m_path, b_path; + trans_path *rm_path, *rb_path; + agg::conv_curve<trans_path> *rm_curve; + + void draw(); + virtual void ConstructPathsAndCurves(agg::trans_affine& mtx, trans_path*& _rm_path, trans_path*& _rb_path, agg::conv_curve<trans_path>*& _rm_curve); + virtual void DoDraw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx ); + virtual void Draw_Clear( RendererBase& rbase ); + virtual void Draw_Draw( RendererBase& rbase, RendererPrimitives& rprim, RendererSolid& rsolid, agg::trans_affine& mtx, agg::rgba color ); + bool refresh_called; + + // set stuff to connect two drawing commands cmd1 and cmd2 such that + // cmd1 comes right before cmd2 + virtual void ConnectSubsequentCmds (DrawCmd* cmd1, DrawCmd* cmd2); + + virtual void AddDrawCmdToAGGPathStorage(DrawCmd* cmd, agg::path_storage& path, DRAWCMDMODE mode = NORMAL); + + virtual std::vector< bool > PrepareC1ContData(); + + DECLARE_EVENT_TABLE() +}; + +namespace agg +{ + class simple_polygon_vertex_source + { + public: + simple_polygon_vertex_source(const double* polygon, unsigned np, + bool roundoff = false, + bool close = true) : + m_polygon(polygon), + m_num_points(np), + m_vertex(0), + m_roundoff(roundoff), + m_close(close) + { + } + + void close(bool f) { m_close = f; } + bool close() const { return m_close; } + + void rewind(unsigned) + { + m_vertex = 0; + } + + unsigned vertex(double* x, double* y) + { + if(m_vertex > m_num_points) return path_cmd_stop; + if(m_vertex == m_num_points) + { + ++m_vertex; + return path_cmd_end_poly | (m_close ? path_flags_close : 0); + } + *x = m_polygon[m_vertex * 2]; + *y = m_polygon[m_vertex * 2 + 1]; + if(m_roundoff) + { + *x = floor(*x) + 0.5; + *y = floor(*y) + 0.5; + } + ++m_vertex; + return (m_vertex == 1) ? path_cmd_move_to : path_cmd_line_to; + } + + private: + const double* m_polygon; + unsigned m_num_points; + unsigned m_vertex; + bool m_roundoff; + bool m_close; + }; +}; + +typedef agg::simple_polygon_vertex_source aggpolygon; diff --git a/assdraw/src/enums.hpp b/assdraw/src/enums.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e5921705687ebffb7d25fccdd9eb56512b41a424 --- /dev/null +++ b/assdraw/src/enums.hpp @@ -0,0 +1,113 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +// enum for IDs of menus +enum { + MENU_DUMMY = 200, + MENU_CLEAR, + MENU_PREVIEW, + MENU_TRANSFORM, + MENU_LIBRARY, + MENU_HELP, + MENU_RESETPERSPECTIVE, + MENU_SETTINGS, + MENU_UNDO, + MENU_REDO, + MENU_PASTE, + MENU_BGIMG_LOAD, + MENU_BGIMG_ALPHA, + MENU_BGIMG_REMOVE, + MENU_RECENTER, + MENU_TBAR, + MENU_REPOS_TOPLEFT, + MENU_REPOS_TOPRIGHT, + MENU_REPOS_CENTER, + MENU_REPOS_BOTLEFT, + MENU_REPOS_BOTRIGHT, + MENU_BGIMG_RECENTER, + MENU_REPOS_BGTOPLEFT, + MENU_REPOS_BGTOPRIGHT, + MENU_REPOS_BGCENTER, + MENU_REPOS_BGBOTLEFT, + MENU_REPOS_BGBOTRIGHT, + MENU_DRC_LNTOBEZ, + MENU_DRC_C1CONTBEZ, + MENU_DRC_BEZTOLN, + MENU_DRC_MOVE00, + MENU_TB_ALL, + MENU_TB_NONE, + MENU_TB_DOCK, + MENU_TB_UNDOCK, + MENU_TB_DRAW, + MENU_TB_MODE, + MENU_TB_BGIMG +}; + +// enum for modes (i.e. create m, b, l etc or normal mode) +// also use as tools IDs +enum MODE +{ + MODE_ARR = 100, + MODE_M = 101, + MODE_N = 102, + MODE_L = 103, + MODE_B = 104, + MODE_S = 105, + MODE_P = 106, + MODE_C = 107, + MODE_DEL = 108, + MODE_SCALEROTATE = 109, + MODE_NUT_BILINEAR = 110 +}; + +// enum for IDs of other tools on the toolbar +enum { + TB_CLEAR = 111, + TB_EDITSRC = 112, + TB_PREVIEW = 113, + TB_TRANSFORM = 114, + TB_HELP = 115, + TB_ZOOMSLIDER = 116, + TB_BGALPHA_SLIDER = 117 +}; + +enum DRAGMODETOOL +{ + DRAG_DWG = 120, + DRAG_BGIMG = 121, + DRAG_BOTH = 122 +}; + +struct DRAGMODE +{ + bool drawing; + bool bgimg; + DRAGMODE() { drawing = true, bgimg = false; } + DRAGMODE(bool d, bool b) { drawing = d, bgimg = b; } +}; diff --git a/assdraw/src/include_once.hpp b/assdraw/src/include_once.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9ef9e8eea3b01b2f1ed0dfa47cea69a4ba08af38 --- /dev/null +++ b/assdraw/src/include_once.hpp @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: include_once.hpp +// Purpose: A header file that is included exactly once for the whole code +// (supposed to be included by assdraw.cpp only) +// Put must-define-exactly-once codes here +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +// tooltips +const wxString TIPS_CLEAR = wxT("Clear the canvas and create a new drawing"); +const wxString TIPS_EDITSRC = wxT("Edit the source"); +const wxString TIPS_PREVIEW = wxT("Draw the shapes without enlarged points and control points"); +const wxString TIPS_TRANSFORM = wxT("Transform the drawing using matrix transformation"); +const wxString TIPS_LIBRARY = wxT("Shapes library"); +const wxString TIPS_HELP = wxT("Help! Help!"); +const wxString TIPS_PASTE = wxT("Depending on what's in the clipboard, import as drawing commands or background"); +const wxString TIPS_UNDO = wxT("Undo last action"); +const wxString TIPS_REDO = wxT("Redo last undo"); +const wxString TIPS_ARR = wxT("Drag mode"); +const wxString TIPS_M = wxT("Draw M mode (Close current shape and move the virtual pen to a new point)"); +const wxString TIPS_N = wxT("Draw N mode (Same as M but doesn't close the shape)"); +const wxString TIPS_L = wxT("Draw L mode (Straight line)"); +const wxString TIPS_B = wxT("Draw B mode (Cubic Bezier curve)"); +const wxString TIPS_S = wxT("Draw S mode (Spline)"); +const wxString TIPS_P = wxT("Draw P mode (Extends a spline with another point)"); +const wxString TIPS_C = wxT("Draw C mode (Close the last spline)"); +const wxString TIPS_DEL = wxT("Delete mode"); +const wxString TIPS_NUTB = wxT("Bilinear transformation mode: Drag the vertices to distort the shape; Dragging an edge moves two adjacent vertices together"); +const wxString TIPS_SCALEROTATE = wxT("Scale/Rotate mode: Drag a vertex or an edge to rescale the shape; Right-drag to rotate"); +const wxString TIPS_DWG = wxT("Right-dragging pans drawing, mousewheel zooms in/out drawing"); +const wxString TIPS_BGIMG = wxT("Right-dragging pans background, mousewheel zooms in/out background"); +const wxString TIPS_BOTH = wxT("Right-dragging pans drawing & background, mousewheel zooms in/out drawing & background"); + +const wxString TBNAME_DRAW = wxT("Canvas"); +const wxString TBNAME_MODE = wxT("Drawing mode"); +const wxString TBNAME_BGIMG = wxT("Background"); +const wxString TBNAME_ZOOM = wxT("Zoom"); + +wxString ASSDrawTransformDlg::combo_templatesStrings[] = { + _("<Select>"), + _("Move 5 units down"), + _("Move 5 units right"), + _("Rotate 90\370 clockwise at (1, 2)"), + _("Rotate 90\370 counterclockwise at (-1, 2)"), + _("Rotate 180\370 at (0, 0)"), + _("Flip horizontally at X = 4"), + _("Flip vertically at Y = 3"), + _("Scale up horizontally by a factor of 2"), + _("Scale up vertically by a factor of 3") +}; + +int ASSDrawTransformDlg::combo_templatesCount = 10; + +EightDouble ASSDrawTransformDlg::combo_templatesValues[] = { + { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f }, //<Select> + { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 5.0f }, //5 units down + { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 5.0f, 0.0f }, //5 units left + { 0.0f, -1.0f, 1.0f, 0.0f, 1.0f, 2.0f, 1.0f, 2.0f }, //90 CW (1,2) + { 0.0f, 1.0f, -1.0f, 0.0f, -1.0f, 2.0f, -1.0f, 2.0f }, //90 CCW, (-1,2) + { -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f }, //180 (0,0) + { -1.0f, 0.0f, 0.0f, 1.0f, 4.0f, 0.0f, 4.0f, 0.0f }, //Flip X = 4 + { 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 3.0f, 0.0f, 3.0f }, //Flip Y = 3 + { 2.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f }, //Scale X * 2 + { 1.0f, 0.0f, 0.0f, 3.0f, 0.0f, 0.0f, 0.0f, 0.0f } //Scale Y * 3 +}; diff --git a/assdraw/src/library.cpp b/assdraw/src/library.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bfb7e9d9770faf3c525bd952f84f608e7b07068f --- /dev/null +++ b/assdraw/src/library.cpp @@ -0,0 +1,265 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "assdraw.hpp" +#include "library.hpp" + +#include <wx/clipbrd.h> + +#if !defined(__WINDOWS__) +#include "xpm/res.h" +#endif + +BEGIN_EVENT_TABLE(ASSDrawShapePreview, ASSDrawEngine) + EVT_SIZE(ASSDrawShapePreview::OnSize) +END_EVENT_TABLE() + +ASSDrawShapePreview::ASSDrawShapePreview( wxWindow *parent, ASSDrawShapeLibrary *_shapelib, wxString initialcmds ) + : ASSDrawEngine(parent, wxSIMPLE_BORDER) +{ + shapelib = _shapelib; + if (ParseASS(initialcmds) > 0) + SetFitToViewPointOnNextPaint(5, 5); + cb = new wxCheckBox(this, wxID_ANY, _T("")); +} + +void ASSDrawShapePreview::OnSize(wxSizeEvent& event) +{ + return; + wxSize siz = event.GetSize(); + + if (shapelib->layout == HORIZONTAL) + SetSize(siz.x, siz.x); + else + SetSize(siz.y, siz.y); + SetFitToViewPointOnNextPaint(10, 10); +} + +BEGIN_EVENT_TABLE(ASSDrawShapeLibrary, wxScrolledWindow) + EVT_SIZE(ASSDrawShapeLibrary::OnSize) + EVT_MENU_RANGE(MENU_RANGE_START, MENU_RANGE_END, ASSDrawShapeLibrary::OnPopupMenuClicked) + EVT_TOOL(TOOL_SAVE, ASSDrawShapeLibrary::SaveShapeFromCanvas) + EVT_TOOL_RANGE(TOOL_CHECK, TOOL_UNCHECK, ASSDrawShapeLibrary::CheckUncheckAllPreviews) + EVT_TOOL(TOOL_DELETE, ASSDrawShapeLibrary::DeleteChecked) +END_EVENT_TABLE() + +ASSDrawShapeLibrary::ASSDrawShapeLibrary( wxWindow *parent, ASSDrawFrame *frame ) + : wxScrolledWindow(parent, wxID_ANY) +{ + m_frame = frame; + //sizer = NULL; + layout = VERTICAL; + + wxToolBar *tbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT | wxTB_NODIVIDER); + tbar->SetMargins(0, 3); + tbar->AddTool(TOOL_SAVE, _T("Save canvas"), wxBITMAP(add)); + tbar->AddSeparator(); + tbar->AddTool(TOOL_CHECK, _T("Select all"), wxBITMAP(check)); + tbar->AddTool(TOOL_UNCHECK, _T("Select none"), wxBITMAP(uncheck)); + tbar->AddTool(TOOL_DELETE, _T("Delete selected"), wxBITMAP(delcross)); + + libarea = new wxScrolledWindow(this, wxID_ANY, __DPDS__ , wxScrolledWindowStyle | wxSIMPLE_BORDER); + libarea->SetBackgroundColour(wxColour(0xFF, 0xFF, 0x99)); + sizer = new wxFlexGridSizer(0, 1, 0, 0); + ((wxFlexGridSizer*) sizer)->AddGrowableCol(0); + libarea->SetSizer(sizer); + libarea->SetScrollbars(20, 20, 50, 50); + libsizer = new wxFlexGridSizer(2, 1, 0, 0); + libsizer->AddGrowableCol(0); + libsizer->AddGrowableRow(1); + libsizer->Add(tbar, 0, wxBOTTOM, 2); + libsizer->Add(libarea,1,wxEXPAND); + tbar->Realize(); + libsizer->Layout(); + + SetSizer(libsizer); +} + +void ASSDrawShapeLibrary::OnSize(wxSizeEvent& event) +{ + if (sizer == NULL || sizer->GetChildren().size() == 0) return; + + wxSize siz = GetClientSize(); + libsizer->SetDimension(0, 0, siz.x, siz.y); + + UpdatePreviewDisplays(); +} + +ASSDrawShapePreview* ASSDrawShapeLibrary::AddShapePreview(wxString cmds, bool addtotop) +{ + ASSDrawShapePreview *prev = new ASSDrawShapePreview(libarea, this, cmds); + prev->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ASSDrawShapeLibrary::OnMouseLeftDClick), NULL, this); + prev->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(ASSDrawShapeLibrary::OnMouseRightClick), NULL, this); + ASSDrawFrame::wxColourToAggRGBA(m_frame->colors.library_shape, prev->rgba_shape); + if (addtotop) + sizer->Insert(0, prev, 1, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5); + else + sizer->Add(prev, 1, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5); + UpdatePreviewDisplays(); + return prev; +} + +void ASSDrawShapeLibrary::UpdatePreviewDisplays() +{ + wxSize siz = GetClientSize(); + int dim = siz.x - 15; + libarea->Show(false); + wxwxSizerItemListNode *node = sizer->GetChildren().GetFirst(); + while (node != NULL) + { + ASSDrawShapePreview *shprvw = (ASSDrawShapePreview *) node->GetData()->GetWindow(); + shprvw->SetSize(dim, dim); + sizer->SetItemMinSize(shprvw, dim - 20, dim - 20); + shprvw->SetFitToViewPointOnNextPaint(10, 10); + shprvw->Refresh(); + node = node->GetNext(); + } + sizer->Layout(); + sizer->FitInside(libarea); + libarea->Show(true); +} + +void ASSDrawShapeLibrary::OnMouseLeftDClick(wxMouseEvent &event) +{ + ASSDrawShapePreview *preview = (ASSDrawShapePreview *) event.GetEventObject(); + LoadToCanvas(preview); +} + +void ASSDrawShapeLibrary::OnMouseRightClick(wxMouseEvent &event) +{ + ASSDrawShapePreview *prev = (ASSDrawShapePreview *) event.GetEventObject(); + if (prev && prev->shapelib == this) + { + activepreview = prev; + wxMenu *menu = new wxMenu; + wxMenuItem *menuload = new wxMenuItem(menu, MENU_LOAD, _T("Load to canvas")); +#ifdef __WINDOWS__ + wxFont f = menuload->GetFont(); + f.SetWeight(wxFONTWEIGHT_BOLD); + menuload->SetFont(f); +#endif + menu->Append(menuload); + //menu->Append(MENU_LOAD, _T("Load to canvas"))->GetFont().SetWeight(wxFONTWEIGHT_BOLD); + menu->Append(MENU_COPYCLIPBOARD, _T("Copy commands to clipboard")); + menu->Append(MENU_SAVECANVAS, _T("Save canvas here")); + wxMenu *submenu = new wxMenu; + submenu->Append(MENU_DELETE, _T("Confirm delete?")); + menu->Append(MENU_DUMMY, _T("Delete from library"), submenu); + PopupMenu(menu); + delete menu; + } +} + +void ASSDrawShapeLibrary::OnPopupMenuClicked(wxCommandEvent &event) +{ + int id = event.GetId(); + switch(id) + { + case MENU_LOAD: + LoadToCanvas(activepreview); + break; + case MENU_COPYCLIPBOARD: + if (wxTheClipboard->Open()) + { + if (wxTheClipboard->IsSupported( wxDF_TEXT )) + { + wxTheClipboard->SetData( new wxTextDataObject( activepreview->GenerateASS() ) ); + } + wxTheClipboard->Close(); + } + break; + case MENU_SAVECANVAS: + activepreview->ParseASS(m_frame->m_canvas->GenerateASS()); + activepreview->SetFitToViewPointOnNextPaint(); + activepreview->RefreshDisplay(); + break; + case MENU_DELETE: + sizer->Detach(activepreview); + activepreview->Show(false); + activepreview->Destroy(); + UpdatePreviewDisplays(); + Refresh(); + break; + } +} + +void ASSDrawShapeLibrary::SaveShapeFromCanvas(wxCommandEvent& WXUNUSED(event)) +{ + AddShapePreview(m_frame->m_canvas->GenerateASS(), true); +} + +void ASSDrawShapeLibrary::CheckUncheckAllPreviews(wxCommandEvent &event) +{ + bool checked = event.GetId() == TOOL_CHECK; + wxwxSizerItemListNode *node = sizer->GetChildren().GetFirst(); + while (node != NULL) + { + ASSDrawShapePreview *shprvw = (ASSDrawShapePreview *) node->GetData()->GetWindow(); + shprvw->cb->SetValue(checked); + node = node->GetNext(); + } +} + +void ASSDrawShapeLibrary::DeleteChecked(wxCommandEvent& WXUNUSED(event)) +{ + wxwxSizerItemListNode *node = sizer->GetChildren().GetFirst(); + while (node != NULL) + { + ASSDrawShapePreview *shprvw = (ASSDrawShapePreview *) node->GetData()->GetWindow(); + if (shprvw->cb->GetValue()) + { + sizer->Detach(shprvw); + shprvw->Show(false); + shprvw->Destroy(); + } + node = node->GetNext(); + } + UpdatePreviewDisplays(); + Refresh(); +} + +std::vector< ASSDrawShapePreview *> ASSDrawShapeLibrary::GetShapePreviews() +{ + std::vector< ASSDrawShapePreview *> out; + wxwxSizerItemListNode *node = sizer->GetChildren().GetFirst(); + while (node != NULL) + { + ASSDrawShapePreview *shprvw = (ASSDrawShapePreview *) node->GetData()->GetWindow(); + out.push_back(shprvw); + node = node->GetNext(); + } + return out; +} + +void ASSDrawShapeLibrary::LoadToCanvas(ASSDrawShapePreview *preview) +{ + m_frame->m_canvas->AddUndo(_T("Load shape from library")); + m_frame->m_canvas->ParseASS(preview->GenerateASS()); + m_frame->m_canvas->RefreshDisplay(); + m_frame->m_canvas->RefreshUndocmds(); + m_frame->UpdateFrameUI(); +} diff --git a/assdraw/src/library.hpp b/assdraw/src/library.hpp new file mode 100644 index 0000000000000000000000000000000000000000..20179d12f2e7845a1541701cb22c95d46d7e83e6 --- /dev/null +++ b/assdraw/src/library.hpp @@ -0,0 +1,88 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "engine.hpp" +#include <wx/scrolwin.h> + +class ASSDrawFrame; +class ASSDrawShapeLibrary; + +enum LIBLAYOUT { VERTICAL, HORIZONTAL }; + +enum { + MENU_RANGE_START = 450, + MENU_LOAD, + MENU_COPYCLIPBOARD, + MENU_SAVECANVAS, + MENU_DELETE, + MENU_RANGE_END, + TOOL_SAVE, + TOOL_CHECK, + TOOL_UNCHECK, + TOOL_DELETE +}; + +class ASSDrawShapePreview : public ASSDrawEngine +{ +protected: + ASSDrawShapePreview( wxWindow *parent, ASSDrawShapeLibrary *shapelib, wxString initialcmds = _T("")); + virtual void OnSize(wxSizeEvent& event); + + ASSDrawShapeLibrary *shapelib; + wxCheckBox *cb; + DECLARE_EVENT_TABLE() + friend class ASSDrawShapeLibrary; +}; + +class ASSDrawShapeLibrary : public wxScrolledWindow +{ +public: + ASSDrawShapeLibrary( wxWindow *parent, ASSDrawFrame *frame ); + virtual ASSDrawShapePreview* AddShapePreview(wxString cmds, bool addtotop = false); + virtual void OnSize(wxSizeEvent& event); + virtual void OnMouseLeftDClick(wxMouseEvent &event); + virtual void OnMouseRightClick(wxMouseEvent &event); + virtual void OnPopupMenuClicked(wxCommandEvent &event); + virtual void SaveShapeFromCanvas(wxCommandEvent& WXUNUSED(event)); + virtual void CheckUncheckAllPreviews(wxCommandEvent &event); + virtual void DeleteChecked(wxCommandEvent& WXUNUSED(event)); + virtual void UpdatePreviewDisplays(); + virtual std::vector< ASSDrawShapePreview *> GetShapePreviews(); + virtual void LoadToCanvas(ASSDrawShapePreview *preview); + + wxScrolledWindow* libarea; + wxFlexGridSizer *libsizer; + wxSizer* sizer; + LIBLAYOUT layout; +protected: + ASSDrawFrame *m_frame; + ASSDrawShapePreview *activepreview; + + DECLARE_EVENT_TABLE() +}; diff --git a/assdraw/src/resource.h b/assdraw/src/resource.h new file mode 100644 index 0000000000000000000000000000000000000000..dab23b6f5eca659ec0413ba3d8883374829280f5 --- /dev/null +++ b/assdraw/src/resource.h @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by assdraw.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 105 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/assdraw/src/settings.cpp b/assdraw/src/settings.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35246a4b3b214856500e4624d01c547044972951 --- /dev/null +++ b/assdraw/src/settings.cpp @@ -0,0 +1,223 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/////////////////////////////////////////////////////////////////////////////// +// Name: settings.cpp +// Purpose: settings property grid +// Author: ai-chan +// Created: 08/26/06 +// Copyright: (c) ai-chan +// Licence: 3-clause BSD +/////////////////////////////////////////////////////////////////////////////// + +#include "assdraw.hpp" +#include "settings.hpp" + +DEFINE_EVENT_TYPE(wxEVT_SETTINGS_CHANGED) + +// ---------------------------------------------------------------------------- +// ASSDrawSettingsDialog +// ---------------------------------------------------------------------------- + +ASSDrawSettingsDialog::ASSDrawSettingsDialog(wxWindow *parent, ASSDrawFrame *frame, int id) + : wxPanel(parent, id) +{ + m_frame = frame; + propgrid = NULL; +} + +void ASSDrawSettingsDialog::Init() +{ + propgrid = new wxPropertyGrid(this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + //wxPG_BOLD_MODIFIED | + //wxPG_SPLITTER_AUTO_CENTER | + //wxPG_AUTO_SORT | + //wxPG_HIDE_MARGIN | wxPG_STATIC_SPLITTER | + wxPG_TOOLTIPS | + //wxPG_NOCATEGORIES | + wxTAB_TRAVERSAL //| + //wxSUNKEN_BORDER + ); + + #define APPENDCOLOURPROP(pgid, label, color) pgid = propgrid->Append(new wxColourProperty(label, wxPG_LABEL, color)); + #define APPENDUINTPROP(pgid, label, uint) \ + pgid = propgrid->Append(new wxUIntProperty(label, wxPG_LABEL, uint) ); \ + propgrid->SetPropertyValidator( pgid, validator ); + #define APPENDBOOLPROP(pgid, label, boolvar) \ + pgid = propgrid->Append(new wxBoolProperty (label, wxPG_LABEL, boolvar ) ); \ + propgrid->SetPropertyAttribute( pgid, wxPG_BOOL_USE_CHECKBOX, (long)1 ); + wxLongPropertyValidator validator(0x0,0xFF); + + propgrid->Append(new wxPropertyCategory(_T("Appearance"),wxPG_LABEL) ); + APPENDCOLOURPROP(colors_canvas_bg_pgid, _T("Canvas"), m_frame->colors.canvas_bg) + APPENDCOLOURPROP(colors_canvas_shape_normal_pgid, _T("Drawing"), m_frame->colors.canvas_shape_normal) + APPENDUINTPROP(alphas_canvas_shape_normal_pgid, _T("Drawing @"), m_frame->alphas.canvas_shape_normal) + APPENDCOLOURPROP(colors_canvas_shape_preview_pgid, _T("Preview"), m_frame->colors.canvas_shape_preview) + APPENDUINTPROP(alphas_canvas_shape_preview_pgid, _T("Preview @"), m_frame->alphas.canvas_shape_preview) + APPENDCOLOURPROP(colors_canvas_shape_outline_pgid, _T("Outline"), m_frame->colors.canvas_shape_outline) + APPENDUINTPROP(alphas_canvas_shape_outline_pgid, _T("Outline @"), m_frame->alphas.canvas_shape_outline) + APPENDCOLOURPROP(colors_canvas_shape_guideline_pgid, _T("Control lines"), m_frame->colors.canvas_shape_guideline) + APPENDUINTPROP(alphas_canvas_shape_guideline_pgid, _T("Control lines @"), m_frame->alphas.canvas_shape_guideline) + APPENDCOLOURPROP(colors_canvas_shape_mainpoint_pgid, _T("Points"), m_frame->colors.canvas_shape_mainpoint) + APPENDUINTPROP(alphas_canvas_shape_mainpoint_pgid, _T("Points @"), m_frame->alphas.canvas_shape_mainpoint) + APPENDCOLOURPROP(colors_canvas_shape_controlpoint_pgid, _T("Control points"), m_frame->colors.canvas_shape_controlpoint) + APPENDUINTPROP(alphas_canvas_shape_controlpoint_pgid, _T("Control points @"), m_frame->alphas.canvas_shape_controlpoint) + APPENDCOLOURPROP(colors_canvas_shape_selectpoint_pgid, _T("Selected points"), m_frame->colors.canvas_shape_selectpoint) + APPENDUINTPROP(alphas_canvas_shape_selectpoint_pgid, _T("Selected points @"), m_frame->alphas.canvas_shape_selectpoint) + APPENDCOLOURPROP(colors_library_libarea_pgid, _T("Library"), m_frame->colors.library_libarea) + APPENDCOLOURPROP(colors_library_shape_pgid, _T("Library shapes"), m_frame->colors.library_shape) + APPENDCOLOURPROP(colors_origin_pgid, _T("Origin"), m_frame->colors.origin) + APPENDUINTPROP(sizes_origincross_pgid, _T("Origin cross size"), m_frame->sizes.origincross) + APPENDCOLOURPROP(colors_ruler_h_pgid, _T("H ruler"), m_frame->colors.ruler_h) + APPENDCOLOURPROP(colors_ruler_v_pgid, _T("V ruler"), m_frame->colors.ruler_v) + + propgrid->Append(new wxPropertyCategory(_T("Behaviors"),wxPG_LABEL) ); + APPENDBOOLPROP(behaviors_capitalizecmds_pgid, _T("Capitalize commands"), m_frame->behaviors.capitalizecmds); + APPENDBOOLPROP(behaviors_autoaskimgopac_pgid, _T("Ask for image opacity"), m_frame->behaviors.autoaskimgopac); + APPENDBOOLPROP(behaviors_parse_spc_pgid, _T("Parse S/P/C"), m_frame->behaviors.parse_spc); + APPENDBOOLPROP(behaviors_nosplashscreen_pgid, _T("No splash screen"), m_frame->behaviors.nosplashscreen); + APPENDBOOLPROP(behaviors_confirmquit_pgid, _T("Confirm quit"), m_frame->behaviors.confirmquit); + + wxFlexGridSizer *sizer = new wxFlexGridSizer(2, 1, 0, 0); + sizer->AddGrowableCol(0); + sizer->AddGrowableRow(0); + sizer->Add(propgrid, 1, wxEXPAND); + + wxBoxSizer *bsizer = new wxBoxSizer(wxHORIZONTAL); + wxButton *abutton = new wxButton(this, wxID_ANY, _T("Apply")); + abutton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ASSDrawSettingsDialog::OnSettingsApplyButtonClicked), NULL, this); + bsizer->Add(abutton, 2, wxEXPAND); + wxButton *rbutton = new wxButton(this, wxID_ANY, _T("Revert")); + rbutton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ASSDrawSettingsDialog::OnSettingsRevertButtonClicked), NULL, this); + bsizer->Add(rbutton, 1, wxEXPAND); + bsizer->Layout(); + + sizer->Add(bsizer, 1, wxEXPAND); + sizer->Layout(); + SetSizer(sizer); +} + +ASSDrawSettingsDialog::~ASSDrawSettingsDialog() +{ + if (propgrid) propgrid->Clear(); +} + +void ASSDrawSettingsDialog::OnSettingsApplyButtonClicked(wxCommandEvent &event) +{ + + wxButton *button = (wxButton *) event.GetEventObject(); + //wxPropertyGrid *propgrid = (wxPropertyGrid *) button->GetClientData(); + if (propgrid == NULL) return; + + #define PARSECOLOR(color, pgid) \ + { \ + wxVariant variant = propgrid->GetPropertyValue(pgid); \ + color = *wxGetVariantCast(variant,wxColour); \ + } + + #define PARSE(ptr, pgid) propgrid->GetPropertyValue(pgid).Convert(ptr); + + PARSECOLOR(m_frame->colors.canvas_bg, colors_canvas_bg_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_controlpoint, colors_canvas_shape_controlpoint_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_guideline, colors_canvas_shape_guideline_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_mainpoint, colors_canvas_shape_mainpoint_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_normal, colors_canvas_shape_normal_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_outline, colors_canvas_shape_outline_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_preview, colors_canvas_shape_preview_pgid) + PARSECOLOR(m_frame->colors.canvas_shape_selectpoint, colors_canvas_shape_selectpoint_pgid) + PARSECOLOR(m_frame->colors.library_libarea, colors_library_libarea_pgid) + PARSECOLOR(m_frame->colors.library_shape, colors_library_shape_pgid) + PARSECOLOR(m_frame->colors.origin, colors_origin_pgid) + PARSECOLOR(m_frame->colors.ruler_h, colors_ruler_h_pgid) + PARSECOLOR(m_frame->colors.ruler_v, colors_ruler_v_pgid) + + PARSE(&m_frame->alphas.canvas_shape_controlpoint, alphas_canvas_shape_controlpoint_pgid) + PARSE(&m_frame->alphas.canvas_shape_guideline, alphas_canvas_shape_guideline_pgid) + PARSE(&m_frame->alphas.canvas_shape_mainpoint, alphas_canvas_shape_mainpoint_pgid) + PARSE(&m_frame->alphas.canvas_shape_normal, alphas_canvas_shape_normal_pgid) + PARSE(&m_frame->alphas.canvas_shape_outline, alphas_canvas_shape_outline_pgid) + PARSE(&m_frame->alphas.canvas_shape_preview, alphas_canvas_shape_preview_pgid) + PARSE(&m_frame->alphas.canvas_shape_selectpoint, alphas_canvas_shape_selectpoint_pgid) + + PARSE(&m_frame->sizes.origincross, sizes_origincross_pgid) + + PARSE(&m_frame->behaviors.autoaskimgopac, behaviors_autoaskimgopac_pgid) + PARSE(&m_frame->behaviors.capitalizecmds, behaviors_capitalizecmds_pgid) + PARSE(&m_frame->behaviors.parse_spc, behaviors_parse_spc_pgid) + PARSE(&m_frame->behaviors.nosplashscreen, behaviors_nosplashscreen_pgid) + PARSE(&m_frame->behaviors.confirmquit, behaviors_confirmquit_pgid) + + wxCommandEvent evento( wxEVT_SETTINGS_CHANGED, event.GetId() ); + evento.SetEventObject( button ); + m_frame->GetEventHandler()->ProcessEvent( evento ); + +} + +void ASSDrawSettingsDialog::OnSettingsRevertButtonClicked(wxCommandEvent &event) +{ + RefreshSettingsDisplay(); +} + +void ASSDrawSettingsDialog::RefreshSettingsDisplay() +{ + if (propgrid == NULL) return; + + #define UPDATESETTING(value, pgid) propgrid->SetPropertyValue(pgid, value); + + UPDATESETTING(m_frame->colors.canvas_bg, colors_canvas_bg_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_controlpoint, colors_canvas_shape_controlpoint_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_guideline, colors_canvas_shape_guideline_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_mainpoint, colors_canvas_shape_mainpoint_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_normal, colors_canvas_shape_normal_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_outline, colors_canvas_shape_outline_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_preview, colors_canvas_shape_preview_pgid) + UPDATESETTING(m_frame->colors.canvas_shape_selectpoint, colors_canvas_shape_selectpoint_pgid) + UPDATESETTING(m_frame->colors.library_libarea, colors_library_libarea_pgid) + UPDATESETTING(m_frame->colors.library_shape, colors_library_shape_pgid) + UPDATESETTING(m_frame->colors.origin, colors_origin_pgid) + UPDATESETTING(m_frame->colors.ruler_h, colors_ruler_h_pgid) + UPDATESETTING(m_frame->colors.ruler_v, colors_ruler_v_pgid) + + UPDATESETTING(m_frame->alphas.canvas_shape_controlpoint, alphas_canvas_shape_controlpoint_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_guideline, alphas_canvas_shape_guideline_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_mainpoint, alphas_canvas_shape_mainpoint_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_normal, alphas_canvas_shape_normal_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_outline, alphas_canvas_shape_outline_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_preview, alphas_canvas_shape_preview_pgid) + UPDATESETTING(m_frame->alphas.canvas_shape_selectpoint, alphas_canvas_shape_selectpoint_pgid) + + UPDATESETTING(m_frame->sizes.origincross, sizes_origincross_pgid) + + UPDATESETTING(m_frame->behaviors.capitalizecmds, behaviors_capitalizecmds_pgid) + UPDATESETTING(m_frame->behaviors.autoaskimgopac, behaviors_autoaskimgopac_pgid) + UPDATESETTING(m_frame->behaviors.parse_spc, behaviors_parse_spc_pgid) + UPDATESETTING(m_frame->behaviors.nosplashscreen, behaviors_nosplashscreen_pgid) + UPDATESETTING(m_frame->behaviors.confirmquit, behaviors_confirmquit_pgid) + +} diff --git a/assdraw/src/settings.hpp b/assdraw/src/settings.hpp new file mode 100644 index 0000000000000000000000000000000000000000..835fe7df7874aa72d483d5bc544f3e7d13759f3f --- /dev/null +++ b/assdraw/src/settings.hpp @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "_common.hpp" +#include <wx/propgrid/propgrid.h> +#include <wx/propgrid/advprops.h> + +class ASSDrawFrame; + +DECLARE_EVENT_TYPE(wxEVT_SETTINGS_CHANGED, -1) + +typedef wxPGProperty* wxPGId; + +class ASSDrawSettingsDialog : public wxPanel +{ +public: + + ASSDrawFrame* m_frame; + + ASSDrawSettingsDialog( wxWindow *parent, ASSDrawFrame *frame, int id = wxID_ANY ); + virtual ~ASSDrawSettingsDialog(); + + virtual void Init(); + virtual void OnSettingsApplyButtonClicked(wxCommandEvent &event); + virtual void OnSettingsRevertButtonClicked(wxCommandEvent &event); + virtual void RefreshSettingsDisplay(); + + wxPGId colors_canvas_bg_pgid; + wxPGId colors_canvas_shape_normal_pgid; + wxPGId colors_canvas_shape_preview_pgid; + wxPGId colors_canvas_shape_outline_pgid; + wxPGId colors_canvas_shape_guideline_pgid; + wxPGId colors_canvas_shape_mainpoint_pgid; + wxPGId colors_canvas_shape_controlpoint_pgid; + wxPGId colors_canvas_shape_selectpoint_pgid; + wxPGId colors_library_shape_pgid; + wxPGId colors_library_libarea_pgid; + wxPGId colors_origin_pgid; + wxPGId colors_ruler_h_pgid; + wxPGId colors_ruler_v_pgid; + wxPGId alphas_canvas_shape_normal_pgid; + wxPGId alphas_canvas_shape_preview_pgid; + wxPGId alphas_canvas_shape_outline_pgid; + wxPGId alphas_canvas_shape_guideline_pgid; + wxPGId alphas_canvas_shape_mainpoint_pgid; + wxPGId alphas_canvas_shape_controlpoint_pgid; + wxPGId alphas_canvas_shape_selectpoint_pgid; + wxPGId sizes_origincross_pgid; + wxPGId behaviors_capitalizecmds_pgid; + wxPGId behaviors_autoaskimgopac_pgid; + wxPGId behaviors_parse_spc_pgid; + wxPGId behaviors_nosplashscreen_pgid; + wxPGId behaviors_confirmquit_pgid; + + wxPropertyGrid *propgrid; + //DECLARE_EVENT_TABLE() + +}; + +class wxLongPropertyValidator : public wxValidator +{ +public: + + wxLongPropertyValidator( const int min, const int max ) + : wxValidator() + { + m_min = min, m_max = max; + } + + virtual wxObject* Clone() const + { + return new wxLongPropertyValidator( m_min, m_max ); + } + + virtual bool Validate(wxWindow* WXUNUSED(parent)) + { + wxTextCtrl* tc = wxDynamicCast(GetWindow(), wxTextCtrl); + wxCHECK_MSG(tc, true, wxT("validator window must be wxTextCtrl")); + + wxString val = tc->GetValue(); + + long valint = 0; + val.ToLong(&valint); + + if (valint < m_min) valint = m_min; + if (valint > m_max) valint = m_max; + + tc->SetValue(wxString::Format(_T("%d"), valint)); + + return true; + } + +private: + int m_min, m_max; +}; diff --git a/assdraw/src/t-stringifier.pl b/assdraw/src/t-stringifier.pl new file mode 100644 index 0000000000000000000000000000000000000000..c1157a05ecc7eb627b48843595dfb45e08e6a31f --- /dev/null +++ b/assdraw/src/t-stringifier.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +########################### +# t-stringifier.pl - replaces "strings" with _T("strings") +# +# Usage: t-stringifier.pl file1 [file2 [file...]] +# NOTE: changes existing files in place so backup stuff or rewrite the script +# (more specifically comment out the rename() call at the end of the main loop) +# if you're paranoid. +# +# Written by Karl Blomster 2008 +# This script is in the public domain. +########################### + + +use warnings; +use strict; + +my @infiles = @ARGV; + +foreach my $infile (@infiles) { + my $outfile = $infile . ".out"; + open(INFILE, "<", $infile) or die("Couldn't open $infile for reading: $!"); + open(OUTFILE, ">", $outfile) or die("Couldn't open $outfile for writing: $!"); + + print("Processing: $infile \n"); + + while (<INFILE>) { + print OUTFILE $_ and next() if (m!^#\s*include!); + + my $line = $_; + + $line =~ s/(_T\(|_\(|wxT\()?"(.*?)(?<!\\)"(\))?/replacementstring($1,$2,$3)/eg; + + print OUTFILE $line; + } + + close(OUTFILE); + close(INFILE); + + + rename($outfile,$infile) or die("Couldn't overwrite ${infile}: $!"); +} + +sub replacementstring { + my ($pre, $string, $post) = @_; + + if ($pre) { + if ($pre eq "_(") { return( qq!_("${string}")! ); } + else { return( qq!_T("${string}")! ); } + } + elsif ($post) { + return( qq!_T("${string}"))! ); + } + else { + return( qq!_T("${string}")! ); + } +} diff --git a/assdraw/src/tsukasa.ico b/assdraw/src/tsukasa.ico new file mode 100644 index 0000000000000000000000000000000000000000..f645f0773c987c58343e8a4b1d722ad64f900f5d Binary files /dev/null and b/assdraw/src/tsukasa.ico differ diff --git a/assdraw/src/wxAGG/AGGWindow.cpp b/assdraw/src/wxAGG/AGGWindow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e5233c15c313ad7dc544273ea89d434c90a51c6 --- /dev/null +++ b/assdraw/src/wxAGG/AGGWindow.cpp @@ -0,0 +1,127 @@ +#include "AGGWindow.h" + +#include "agg_rendering_buffer.h" +#include "agg_pixfmt_rgb.h" + +#include <wx/dcclient.h> + +namespace GUI { + + BEGIN_EVENT_TABLE(AGGWindow, wxWindow) + EVT_PAINT(AGGWindow::onPaint) + EVT_SIZE(AGGWindow::onSize) + EVT_ERASE_BACKGROUND(AGGWindow::onEraseBackground) + END_EVENT_TABLE() + + AGGWindow::AGGWindow(wxWindow* parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, long style): + wxWindow(parent, id, pos, size, style, wxT("AGGWindow")), + bitmap(NULL) { + } + + void AGGWindow::init(const int width, const int height) { + memDC.SelectObject(wxNullBitmap); + delete bitmap; + + int ncheight = height, ncwidth = width; + if (ncwidth < 1) ncwidth = 1; + if (ncheight < 1) ncheight = 1; + + bitmap = new wxBitmap(ncwidth, ncheight, PixelFormat::wxWidgetsType::BitsPerPixel); + + // Draw the bitmap + attachAndDraw(); + + memDC.SelectObject(*bitmap); + + // Request a full redraw of the window + Refresh(false); + } + + AGGWindow::~AGGWindow() { + memDC.SelectObject(wxNullBitmap); + delete bitmap; + } + + void AGGWindow::attachAndDraw() { + // Get raw access to the wxWidgets bitmap -- this locks the pixels and + // unlocks on destruction. + PixelData data(*bitmap); + assert(data); + +#if 1 + // This cast looks like it is ignoring byte-ordering, but the + // pixel format already explicitly handles that. + assert(data.GetPixels().IsOk()); + wxAlphaPixelFormat::ChannelType* pd = (wxAlphaPixelFormat::ChannelType*) &data.GetPixels().Data(); + + // wxWidgets always returns a pointer to the first row of pixels, whether + // that is stored at the beginning of the buffer (stride > 0) or at the + // end of the buffer (stride < 0). AGG always wants a pointer to the + // beginning of the buffer, no matter what the stride. (AGG does handle + // negative strides correctly.) + // Upshot: if the stride is negative, rewind the pointer from the end of + // the buffer to the beginning. + const int stride = data.GetRowStride(); + if (stride < 0) + pd += (data.GetHeight() - 1) * stride; + + rBuf.attach(pd, data.GetWidth(), data.GetHeight(), stride); + + // Call the user code to actually draw. + draw(); +#else + PixelData::Iterator p(data); + + // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b + p.Offset(data, 10, 10); + + for ( int y = 0; y < 10; ++y ) + { + PixelData::Iterator rowStart = p; + + for ( int x = 0; x < 10; ++x, ++p ) + { + p.Red() = 255; + p.Green() = 0; + p.Blue() = 255; + } + + p = rowStart; + p.OffsetY(data, 1); + } +#endif + } + + void AGGWindow::onSize(wxSizeEvent& event) { + const wxSize size = GetClientSize(); + if (bitmap && size.GetWidth() == bitmap->GetWidth() && size.GetHeight() == bitmap->GetHeight()) + return; + + init(size.GetWidth(), size.GetHeight()); + } + + void AGGWindow::onPaint(wxPaintEvent& event) { + wxPaintDC dc(this); + + wxCoord width, height; + dc.GetSize(&width, &height); + if (!bitmap || bitmap->GetWidth() != width || bitmap->GetHeight() != height) + init(width, height); + + // Iterate over regions needing repainting + wxRegionIterator regions(GetUpdateRegion()); + wxRect rect; + while (regions) { + rect = regions.GetRect(); + dc.Blit(rect.x, rect.y, rect.width, rect.height, &memDC, rect.x, rect.y); + ++regions; + } + } + + void AGGWindow::onEraseBackground(wxEraseEvent& WXUNUSED(event)) { + // Do nothing to "avoid flashing in MSW" Grr. + } + +} + diff --git a/assdraw/src/wxAGG/AGGWindow.h b/assdraw/src/wxAGG/AGGWindow.h new file mode 100644 index 0000000000000000000000000000000000000000..01039da39f2ef62e016e83fb80c1611c7f7c4862 --- /dev/null +++ b/assdraw/src/wxAGG/AGGWindow.h @@ -0,0 +1,68 @@ +#ifndef WX_AGG_WINDOW_H +#define WX_AGG_WINDOW_H + +#include "PixelFormatConvertor.h" + +#include <wx/bitmap.h> +#include <wx/rawbmp.h> +#include <wx/window.h> +#include <wx/dcmemory.h> + +#include "agg_rendering_buffer.h" + +namespace GUI { + + /// A simple widget that displays a bitmap that AGG can draw on. + /// It reallocates the bitmap so that it always is the current size of the + /// entire panel and calls the virtual method draw() to draw to the bitmap. + /// This should be useable anywhere a wxWindow can be, e.g. in actual windows, + /// buttons, etc. + class AGGWindow: public wxWindow { + public: + /// Create an AGGWindow. Defaults are taken from wxWindow::wxWindow(), see + /// that documentation for more information. + AGGWindow(wxWindow* parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL); + + /// Clean up resources held + virtual ~AGGWindow(); + + protected: + + /// The conversion between wxWidgets' pixel format and AGG's pixel format + typedef PixelFormatConvertor<wxNativePixelFormat> PixelFormat; + + /// The wxWidgets "pixel data" type, an accessor to the raw pixels + typedef wxPixelData<wxBitmap, PixelFormat::wxWidgetsType> PixelData; + + + /// Create the bitmap given the current size. + void init(const int width, const int height); + + /// Attach the AGG rendering buffer to the bitmap and call the user draw() code. + void attachAndDraw(); + + /// Paint the bitmap onto the panel. + void onPaint(wxPaintEvent& event); + + /// Resize the bitmap to match the window. + void onSize(wxSizeEvent& event); + + /// Handle the erase-background event. + void onEraseBackground(wxEraseEvent& event); + + /// Draw into the bitmap using AGG. + virtual void draw() = 0; + + + wxBitmap* bitmap; ///< wxWidgets bitmap for AGG to draw into + wxMemoryDC memDC; ///< Memory "device context" for drawing the bitmap + + agg::rendering_buffer rBuf; ///< AGG's rendering buffer, pointing into the bitmap + + DECLARE_EVENT_TABLE() /// Allocate wxWidgets storage for event handlers + }; +} + +#endif diff --git a/assdraw/src/wxAGG/Makefile.am b/assdraw/src/wxAGG/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..30e08828622a3ae452e23eebc85d1584fad0e06a --- /dev/null +++ b/assdraw/src/wxAGG/Makefile.am @@ -0,0 +1,8 @@ +AM_CXXFLAGS = @WX_CPPFLAGS@ @LIBAGG_CFLAGS@ + +noinst_LIBRARIES = libaggwindow.a + +libaggwindow_a_SOURCES = \ + AGGWindow.cpp \ + AGGWindow.h \ + PixelFormatConvertor.h diff --git a/assdraw/src/wxAGG/PixelFormatConvertor.h b/assdraw/src/wxAGG/PixelFormatConvertor.h new file mode 100644 index 0000000000000000000000000000000000000000..d1b0741c4235fa71dd8c23674e2df381e81f886d --- /dev/null +++ b/assdraw/src/wxAGG/PixelFormatConvertor.h @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2007, ai-chan +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the ASSDraw3 Team nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef WX_AGG_PIXEL_FORMAT_CONVERTOR_H +#define WX_AGG_PIXEL_FORMAT_CONVERTOR_H + +#include "agg_pixfmt_rgb.h" +#include "agg_pixfmt_rgba.h" + +namespace { + + /// Given a particular combination of channel type, bits per pixel and + /// channel indices, return the AGG format that matches. + /// The actual template specializations that follow give the actual types, + /// and using a combination of parameters that are not listed will give + /// a compile-time error. + template <typename Channel, int bitsPerPixel, int r, int g, int b, int a> + struct wxWidgetsToAGGHelper { + //empty + }; + + /// 24-bit RGB + template <> struct wxWidgetsToAGGHelper<unsigned char, 24, 0, 1, 2, -1> { + typedef agg::pixfmt_rgb24 format; + }; + + /// 24-bit BGR + template <> struct wxWidgetsToAGGHelper<unsigned char, 24, 2, 1, 0, -1> { + typedef agg::pixfmt_bgr24 format; + }; + + /// 32-bit RGB, alpha unused but stored as ARGB. + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 1, 2, 3, -1> { + typedef agg::pixfmt_argb32 format; + }; + + /// 32-bit RGB, alpha unused but stored as RGBA. + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 0, 1, 2, -1> { + typedef agg::pixfmt_rgba32 format; + }; + + /// 32-bit BGR, alpha unused but stored as ABGR. + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 3, 2, 1, -1> { + typedef agg::pixfmt_abgr32 format; + }; + + /// 32-bit BGR, alpha unused but stored as BGRA. + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 2, 1, 0, -1> { + typedef agg::pixfmt_bgra32 format; + }; + + /// 32-bit RGBA + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 0, 1, 2, 3> { + typedef agg::pixfmt_rgba32 format; + }; + + /// 32-bit BGRA + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 2, 1, 0, 3> { + typedef agg::pixfmt_bgra32 format; + }; + + /// 32-bit ARGB + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 1, 2, 3, 0> { + typedef agg::pixfmt_argb32 format; + }; + + /// 32-bit ABGR + template <> struct wxWidgetsToAGGHelper<unsigned char, 32, 3, 2, 1, 0> { + typedef agg::pixfmt_abgr32 format; + }; +} + +namespace GUI { + /// Convert between a wxWidgets pixel format class and an AGG pixel format class. + /// Usage examples: + /// PixelFormatConvertor<wxNativePixelFormat>::AGGType or + /// PixelFormatConvertor<wxAlphaPixelFormat>::AGGType. + template <typename wxWidgetsPixelFormat> + class PixelFormatConvertor { + public: + typedef wxWidgetsPixelFormat wxWidgetsType; + + // Break out the wxWidgets parameters and feed to the helper class. + typedef typename wxWidgetsToAGGHelper<typename wxWidgetsPixelFormat::ChannelType, + wxWidgetsPixelFormat::BitsPerPixel, + wxWidgetsPixelFormat::RED, + wxWidgetsPixelFormat::GREEN, + wxWidgetsPixelFormat::BLUE, + wxWidgetsPixelFormat::ALPHA>::format AGGType; + }; +} + +#endif diff --git a/assdraw/src/xpm/Makefile.am b/assdraw/src/xpm/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..77d90ad686e479a4fd5b217ed8f16b020047b582 --- /dev/null +++ b/assdraw/src/xpm/Makefile.am @@ -0,0 +1,4 @@ +noinst_LIBRARIES = libres.a + +libres_a_SOURCES = res.cpp res.h + diff --git a/assdraw/src/xpm/add__xpm.xpm b/assdraw/src/xpm/add__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..b118b1acf1175765aaeea06c269538b3304a0053 --- /dev/null +++ b/assdraw/src/xpm/add__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *add_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c black", +". c #99999999FFFF", +"X c None", +/* pixels */ +"XXXXX XXXXX", +"XXXXX .... XXXXX", +"XXXXX .... XXXXX", +"XXXXX .... XXXXX", +"X .... X", +"X ............ X", +"X ............ X", +"X ............ X", +"X ............ X", +"X .... X", +"XXXXX .... XXXXX", +"XXXXX .... XXXXX", +"XXXXX .... XXXXX", +"XXXXX XXXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/appico_xpm.xpm b/assdraw/src/xpm/appico_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..f80ee6c27a659c97baa3bb70c0e0b70964805c8b --- /dev/null +++ b/assdraw/src/xpm/appico_xpm.xpm @@ -0,0 +1,292 @@ +/* XPM */ +const char *appico_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 254 2", +" c black", +". c #121508", +"X c #1E1913", +"o c #222200", +"O c #252817", +"+ c #313117", +"@ c #15152A", +"# c #2A002A", +"$ c #3F003F", +"% c #3F1F3F", +"& c #332023", +"* c #26392C", +"= c #333223", +"- c #322E36", +"; c #2C3939", +": c #4D313F", +"> c #55383E", +", c #555500", +"< c #464F2B", +"1 c #54542A", +"2 c #4D4E3F", +"3 c #575937", +"4 c #5E672D", +"5 c #6D7029", +"6 c #362B56", +"7 c #363571", +"8 c #4C355F", +"9 c #583B55", +"0 c #443579", +"q c #3C4575", +"w c #4A4757", +"e c #644D5D", +"r c #6A5D5A", +"t c #50624A", +"y c #626448", +"u c #626D51", +"i c #787A55", +"p c #554875", +"a c #67537A", +"s c #70517F", +"d c #756C60", +"f c #7F7C65", +"g c #626D75", +"h c #637479", +"j c #AB713F", +"k c #AF7D4C", +"l c #8F7662", +"z c #9C7277", +"x c #E76F5B", +"c c #81992A", +"v c #D3B80F", +"b c #EFBE0F", +"n c #C1A821", +"m c #F5CE11", +"M c #DDCC22", +"N c #90805C", +"B c #97A447", +"V c #8BBB4C", +"C c #91B648", +"Z c #99AA55", +"A c #91BB5D", +"S c #A5B859", +"D c #8B8F65", +"F c #959469", +"G c #878B7D", +"H c #989970", +"J c #AB956B", +"K c #BABC6D", +"L c #ACA977", +"P c #B8B376", +"I c #C7814B", +"U c #EB8D50", +"Y c #DB8A69", +"T c #DAA87A", +"R c #A0C64B", +"E c #BEC254", +"W c #A9D058", +"Q c #AEC96B", +"! c #AAD071", +"~ c #D1D647", +"^ c #DBDF5C", +"/ c #CCE252", +"( c #D8ED5F", +") c #E5EC56", +"_ c #E2F35A", +"` c #FEFE59", +"' c #CECF6F", +"] c #C6D460", +"[ c #D7DC65", +"{ c #CFD47E", +"} c #D5D879", +"| c #CAE365", +" . c #D3EB6C", +".. c #D0EA72", +"X. c #E3E864", +"o. c #EBF268", +"O. c #FDFD66", +"+. c #E3E976", +"@. c #E8F376", +"#. c #FDFD74", +"$. c #3B3D8E", +"%. c #3B3CA8", +"&. c #413DB3", +"*. c #554887", +"=. c #405587", +"-. c #494197", +";. c #544894", +":. c #5E5896", +">. c #654F9C", +",. c #655A9B", +"<. c #785E98", +"1. c #577494", +"2. c #67718D", +"3. c #78778A", +"4. c #65639A", +"5. c #756499", +"6. c #667F99", +"7. c #73769E", +"8. c #4C4BB1", +"9. c #6E5CA1", +"0. c #745DA2", +"q. c #615AB9", +"w. c #6B66A8", +"e. c #7B65A7", +"r. c #797BA3", +"t. c #6B66B7", +"y. c #7565B2", +"u. c #7A7BB5", +"i. c #4443C6", +"p. c #6E63CC", +"a. c #796BC6", +"s. c #7673C2", +"d. c #6B64D8", +"f. c #766DD7", +"g. c #7C74D6", +"h. c #7C74E0", +"j. c #816CAF", +"k. c #8964B8", +"l. c #867AB6", +"z. c #8479D8", +"x. c #917BD3", +"c. c #887BE7", +"v. c #917BE8", +"b. c #8D79F4", +"n. c #987CF9", +"m. c #6481A1", +"M. c #7B83B8", +"N. c #868289", +"B. c #979D80", +"V. c #888695", +"C. c #8C929A", +"Z. c #9A9898", +"A. c #A69898", +"S. c #98BF95", +"D. c #B3AE8E", +"F. c #B7B98C", +"G. c #ACAB96", +"H. c #B6B792", +"J. c #8A88A8", +"K. c #9285AA", +"L. c #9996A3", +"P. c #8480BE", +"I. c #978EBC", +"U. c #9E9DBA", +"Y. c #A39BB6", +"T. c #93B8B1", +"R. c #A8A0A6", +"E. c #B3A9AF", +"W. c #B4B0A4", +"Q. c #A8A6B6", +"!. c #B3AFBF", +"~. c #B9B6B6", +"^. c #D3AC80", +"/. c #DABC98", +"(. c #E1AC82", +"). c #FFBB89", +"_. c #E9BD91", +"`. c #C5B7A7", +"'. c #BEC18C", +"]. c #A6C19D", +"[. c #98C6B1", +"{. c #A4C7AA", +"}. c #C8C385", +"|. c #D1D28E", +" X c #C7C998", +".X c #CCD59C", +"XX c #FFC18C", +"oX c #E9C994", +"OX c #F4C890", +"+X c #E9D198", +"@X c #FFD698", +"#X c #DAE082", +"$X c #D8ED9A", +"%X c #FFE19F", +"&X c #F0F09E", +"*X c #D5CEA3", +"=X c #D9D9A5", +"-X c #C7C3B8", +";X c #D4C8BB", +":X c #DCD8B8", +">X c #EBCAA2", +",X c #FADBA1", +"<X c #DDE1A9", +"1X c #E6E5AC", +"2X c #FCE6A8", +"3X c #FFF3AE", +"4X c #E8E7B6", +"5X c #F5EAB2", +"6X c #FDFAB9", +"7X c #9789CB", +"8X c #9D96CC", +"9X c #8D85D7", +"0X c #9889D4", +"qX c #9790DB", +"wX c #AA9BC8", +"eX c #A496D7", +"rX c #ABA5C4", +"tX c #B4A5C8", +"yX c #B2B5C7", +"uX c #B4ABD7", +"iX c #8D83EB", +"pX c #9686E9", +"aX c #9B92E9", +"sX c #8B82F2", +"dX c #9886F4", +"fX c #9C90F8", +"gX c #A38FE7", +"hX c #A899E9", +"jX c #A38CFE", +"kX c #A593FE", +"lX c #B19BFF", +"zX c #AFBBE0", +"xX c #ACA6F7", +"cX c #B5ABFE", +"vX c #BAB2FE", +"bX c #A9D8C4", +"nX c #D3CFC5", +"mX c #CED9CB", +"MX c #DAD7C6", +"NX c #CCC6D5", +"BX c #EAECC5", +"VX c #F0ECC4", +"CX c #ECF1CD", +"ZX c #FEFEC6", +"AX c #FFFED0", +"SX c #C4C7EF", +"DX c #C9C1FF", +"FX c #D0CCFE", +"GX c #D8D8FE", +"HX c #CEE0E3", +"JX c #DCF1E9", +"KX c #E0E0E7", +"LX c #E5E3FF", +"PX c #F9FBFB", +/* pixels */ +" | @.#.o.S w.a.s.u.Z ( | ", +" Q .#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jXf.kXpX0.", +"w pXkXdXdXd.r.H = 3 2X2X@X@X2X}.+ . O i G.kXkXkXdXf.kXx.s ", +" $ dXkXs.pXq.G O 2 XZX6X%XXX).).).OXoXL y X kXkXkXc.f.kXx.: ", +" $ dXkX3.uXP. X X5X6XZX6X2X@X@X@X,X,X3XZXZX'.w kXkXkXg.h.kXe. ", +" pXj.3.~.Q.=X6X6X6X6XZX6X6X6X6X6X6XZX6X6X5XwXkXkXdXp.c.kX8 ", +" z.<.0.7.Z. X5X2X2X6XZXZX,XT (.^.ZXZX6X3X+XeXkXkXiXq.sXz.% ", +" ,.5.>.i.%.7 ,X,X,X6XZXZXoXx x Y ZXZX6X@X_.eXkXkXg.q.h.w. ", +" p 9 ;.i.&.0 l >X2X6XZXZX6XoX_.5XZXZX6X2X/.0XkXc.t.q.t.9X ", +" & *.i.&.0 6 6 K.-XVXAXZXZXZXZXZXZX4X`.:.z.kX8.8.p e 5. ", +" -.i.%.9 6 6 &.8.w.V. XZXZX2XG.J.w.8.8.c.iX8.-.a > 9 ", +" 7 %.7 X X 7 %.=.T.N I I j 1.1.$.7 8.c.t.%.6 - ", +" ; $.B v c c t m.[.[.J U U k [.T.u H.Z.7Xg q t o ", +" * v m m +.! [.bX[.k U U J ].4X<XZXAX X4 < ", +" C V v m m &X$XA [.bXk U J {.S..X5X1XZXZXn b M " +}; diff --git a/assdraw/src/xpm/arr_1_xpm.xpm b/assdraw/src/xpm/arr_1_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..3dc535ee44d034f923e421657e98a5850f6669b4 --- /dev/null +++ b/assdraw/src/xpm/arr_1_xpm.xpm @@ -0,0 +1,64 @@ +/* XPM */ +const char *arr___xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 43 1", +" c black", +". c gray1", +"X c gray2", +"o c gray9", +"O c #282828282828", +"+ c #2A2A2A2A2A2A", +"@ c #3A3A3A3A3A3A", +"# c #3C3C3C3C3C3C", +"$ c #494949494949", +"% c gray35", +"& c #747473737373", +"* c #777777777777", +"= c #888887878787", +"- c #8F8F8E8E8E8E", +"; c gray60", +": c #9D9D9D9D9D9D", +"> c #A2A29F9F9F9F", +", c #B6B6B6B6B6B6", +"< c gray74", +"1 c #C5C5C5C5C5C5", +"2 c #C9C9C9C9CACA", +"3 c gray80", +"4 c #CDCDCDCDCDCD", +"5 c #CECECECECECE", +"6 c #D0D0D0D0D0D0", +"7 c #D1D1D1D1D0D0", +"8 c gray82", +"9 c gray83", +"0 c #D7D7D7D7D6D6", +"q c #D7D7D7D7D7D7", +"w c gainsboro", +"e c #DFDFDFDFDFDF", +"r c #E2E2E2E2E2E2", +"t c gray90", +"y c #E6E6E6E6E6E6", +"u c #EAEAEAEAEAEA", +"i c #ECECECECECEC", +"p c gray93", +"a c #F2F2F3F3F2F2", +"s c #F9F9F9F9F9F9", +"d c gray99", +"f c gray100", +"g c None", +/* pixels */ +"ggggyggggggggggg", +"gggg-9gggggggggg", +"gggg- 8ggggggggg", +"gggg-0 5gggggggg", +"gggg-f,#5ggggggg", +"gggg-fs* 5gggggg", +"gggg-dp,* 4ggggg", +"gggg-ae2>* 5gggg", +"gggg-t7X uggg", +"gggg-0% X193gggg", +"gggg-$<@ &gggggg", +"gggg-6w: oqggggg", +"ggggiggrO =ggggg", +"gggggggw;.+pgggg", +"ggggggggt +ugggg" +}; diff --git a/assdraw/src/xpm/arr__xpm.xpm b/assdraw/src/xpm/arr__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..5022b7852dd16d65895c18dd63dbb044bea484c7 --- /dev/null +++ b/assdraw/src/xpm/arr__xpm.xpm @@ -0,0 +1,64 @@ +/* XPM */ +const char *arr__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 43 1", +" c black", +". c gray1", +"X c gray2", +"o c gray9", +"O c #282828282828", +"+ c #2A2A2A2A2A2A", +"@ c #3A3A3A3A3A3A", +"# c #3C3C3C3C3C3C", +"$ c #494949494949", +"% c gray35", +"& c #747473737373", +"* c #777777777777", +"= c #888887878787", +"- c #8F8F8E8E8E8E", +"; c gray60", +": c #9D9D9D9D9D9D", +"> c #A2A29F9F9F9F", +", c #B6B6B6B6B6B6", +"< c gray74", +"1 c #C5C5C5C5C5C5", +"2 c #C9C9C9C9CACA", +"3 c gray80", +"4 c #CDCDCDCDCDCD", +"5 c #CECECECECECE", +"6 c #D0D0D0D0D0D0", +"7 c #D1D1D1D1D0D0", +"8 c gray82", +"9 c gray83", +"0 c #D7D7D7D7D6D6", +"q c #D7D7D7D7D7D7", +"w c gainsboro", +"e c #DFDFDFDFDFDF", +"r c #E2E2E2E2E2E2", +"t c gray90", +"y c #E6E6E6E6E6E6", +"u c #EAEAEAEAEAEA", +"i c #ECECECECECEC", +"p c gray93", +"a c #F2F2F3F3F2F2", +"s c #F9F9F9F9F9F9", +"d c gray99", +"f c gray100", +"g c None", +/* pixels */ +"ggggyggggggggggg", +"gggg-9gggggggggg", +"gggg- 8ggggggggg", +"gggg-0 5gggggggg", +"gggg-f,#5ggggggg", +"gggg-fs* 5gggggg", +"gggg-dp,* 4ggggg", +"gggg-ae2>* 5gggg", +"gggg-t7X uggg", +"gggg-0% X193gggg", +"gggg-$<@ &gggggg", +"gggg-6w: oqggggg", +"ggggiggrO =ggggg", +"gggggggw;.+pgggg", +"ggggggggt +ugggg" +}; diff --git a/assdraw/src/xpm/assdraw3_xpm.xpm b/assdraw/src/xpm/assdraw3_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..3fec4fe03806093dfe9a85d2a8054c3e0943a61f --- /dev/null +++ b/assdraw/src/xpm/assdraw3_xpm.xpm @@ -0,0 +1,362 @@ +/* XPM */ +const char *assdraw3__xpm[] = { +/* columns rows colors chars-per-pixel */ +"400 100 256 2", +" c #28AB0BFA0F09", +". c #28960E0E13CB", +"X c #765D23C626EF", +"o c #5590382452C9", +"O c #7143583C597E", +"+ c #72C050027049", +"@ c #83F81A0E1A0E", +"# c #8C6430583368", +"$ c #87FC3C8E4395", +"% c #917749A94FF5", +"& c #910059486920", +"* c #90BF6D3E70D5", +"= c #A1096E346C0F", +"- c #AF2F96FE721A", +"; c #E654B694684E", +": c #F2CAC2D668DF", +"> c #36C239BEABF3", +", c #37064141AE58", +"< c #3A9D4229AE8E", +"1 c #3AC846E1B34F", +"2 c #3C664C47B584", +"3 c #3BF750FEB66D", +"4 c #3D4E5802BC51", +"5 c #3DC96161BF79", +"6 c #7636552590B8", +"7 c #42114D5DB551", +"8 c #40404F4FB8B8", +"9 c #43FB5266B639", +"0 c #48C55424B730", +"q c #431255BABB08", +"w c #43E45BA1BCB2", +"e c #4DB45926BA20", +"r c #4AD25C1DBC76", +"t c #49CD6262BE4E", +"y c #52676459BEE3", +"u c #3DDF6E97C9D7", +"i c #4CA86B87C7C7", +"p c #497E78D9CCD2", +"a c #568C78CFCC0E", +"s c #49297A84D662", +"d c #55427C03D410", +"f c #5C9C7BFCD1E1", +"g c #933A70B08E99", +"h c #9CB272409D38", +"j c #93B971DCAEBB", +"k c #C4C47F7F8181", +"l c #994977CACA20", +"z c #993C778ED200", +"x c #A3097D4AC62C", +"c c #3EBF8808D757", +"v c #062B96DFFFFF", +"b c #18349E22FFFF", +"n c #343E8F05FFFF", +"m c #3A3A8F8FFFFF", +"M c #341392F7FFFF", +"N c #3BD4949CFFFF", +"B c #32339C25FFFF", +"V c #3C0D9BCEFFFF", +"C c #2222A2A2FFFF", +"Z c #2CFFA676FFFF", +"A c #2E92AC92FFFF", +"S c #313FA3C1FFFF", +"D c #3C29A42BFFF8", +"F c #340BAB35FFFF", +"G c #3C4AACD6FFE6", +"H c #2CE2B584FFFF", +"J c #2C41B8DBFFFF", +"K c #33D1B5BCFFFF", +"L c #3C20B48CFF30", +"P c #3450B985FFFF", +"I c #3C65BACAFF95", +"U c #56F68383CEA6", +"Y c #487F87FED841", +"T c #4C358CDFD71A", +"R c #582F8856D760", +"E c #5852979FDC15", +"W c #66CD8807D103", +"Q c #65B489C4D61F", +"! c #66D796E9DB25", +"~ c #74009813DB2B", +"^ c #5D38A1EADF83", +"/ c #6E44A421DE0C", +"( c #4F5F8B86E567", +") c #48969863E8D8", +"_ c #587D97F7E9E9", +"` c #496A97B0F5EB", +"' c #43A49648FE2B", +"] c #43689BE0FF5B", +"[ c #4B189CEBFF90", +"{ c #55CC9C62F711", +"} c #66E799F6E703", +"| c #726B9C5AE460", +" . c #488DA8B4ECBC", +".. c #586DA881E935", +"X. c #4E4EB0B0EFEF", +"o. c #5A4DB224EDFF", +"O. c #46F4A98AF404", +"+. c #4321A3AFFF1B", +"@. c #4D27A393FF7A", +"#. c #4354ABEDFEE4", +"$. c #4BD7AC56FEFA", +"%. c #55A2A7C4F48D", +"&. c #53DDA385FE94", +"*. c #5BE8A589FF9D", +"=. c #5363AC12FEB9", +"-. c #5C99AB49FFB8", +";. c #4807B49BF5C3", +":. c #4317B372FF10", +">. c #4C03B446FECA", +",. c #43A1BD08FF53", +"<. c #4B12BCE2FE59", +"1. c #56B2B52EF88E", +"2. c #5296B4E1FF39", +"3. c #5480BAE7FF1E", +"4. c #5C2ABBB4FF9F", +"5. c #678AA81EE7FD", +"6. c #775EA85EE91D", +"7. c #66F9B3C5EC19", +"8. c #7987B6D6EB12", +"9. c #63F0AB70FF9C", +"0. c #67F1AA89FB42", +"q. c #7568ACF4F599", +"w. c #65CEB620FA05", +"e. c #6BE7B352FFDB", +"r. c #62D6BCE6FFC1", +"t. c #69D7BDA0FFC7", +"y. c #7445B41AFFB0", +"u. c #7771B90BFB58", +"i. c #7CFBBBB9FFDA", +"p. c #465DC0C0FFFF", +"a. c #4B39C159FFF4", +"s. c #5402C363FFEE", +"d. c #5C08C549FFC7", +"f. c #5E4AC8C8FFD7", +"g. c #7D27C0C0EFEF", +"h. c #6BC1C26CF6EA", +"j. c #637AC51CFF58", +"k. c #6C8BC406FF82", +"l. c #6459C983FFF2", +"z. c #6BF1CB67FFDA", +"x. c #78EFC45FF587", +"c. c #73ACC4B8FF4E", +"v. c #7AE0C563FFC1", +"b. c #73FECDDAFFD6", +"n. c #7D0ACC39FFD0", +"m. c #7676D100FFFF", +"M. c #7CECD1F1FFFD", +"N. c #AD418EA89292", +"B. c #A8A196DE9560", +"V. c #AE7D90C8B02F", +"C. c #B1EEA9E1B4A9", +"Z. c #D93B929299E1", +"A. c #CC5EB10F930F", +"S. c #E9BAA4369224", +"D. c #CF39B2CFAFCF", +"F. c #F80AB8E3B4B4", +"G. c #BE3EC7C7BCBC", +"H. c #DF84CDC89EFE", +"J. c #FA24EA148F39", +"K. c #FB99E9B995EB", +"L. c #FA72E78F983D", +"P. c #FC13E9B69A64", +"I. c #FACEC494BCA2", +"U. c #E9F1D33EB055", +"Y. c #FADAEAF3A8DA", +"T. c #AD4398F3D9D9", +"R. c #B4BE9084D060", +"E. c #B21DB290CB18", +"W. c #8974B187EC76", +"Q. c #8633B972EC03", +"!. c #8A5CBB6CF842", +"~. c #8432BCD8FFAD", +"^. c #94D6BD38F488", +"/. c #C7AAA02ED27C", +"(. c #C9D8AC35D1A5", +"). c #C5459E61E9D8", +"_. c #C88A9F32F3A5", +"`. c #CAE6A742E767", +"'. c #C6D7A24FEDA6", +"]. c #CADFA3EEEDB2", +"[. c #D42DB04CED0D", +"{. c #C72AA224F318", +"}. c #CA9BA2E3F33B", +"|. c #CC28A631F61E", +" X c #BB02C666DB8D", +".X c #899BC340EECB", +"XX c #9309C49CEF02", +"oX c #8CCCCB08F4F2", +"OX c #86BDC4C7F8A3", +"+X c #8C8AC3A3FFB1", +"@X c #84A6CC40FFA5", +"#X c #8B89CD17FF99", +"$X c #9A4EC6C5F75E", +"%X c #9372CCE5F4BA", +"&X c #9414C4D3FE9F", +"*X c #942ECC3DFF0A", +"=X c #9CA4CB6BFEA6", +"-X c #844ED403FFF3", +";X c #8BE4D56DFFC1", +":X c #8E73D8EAFFFF", +">X c #99B5D2B3F720", +",X c #93F0D3D0FEA2", +"<X c #9C25D53CFD2B", +"1X c #94F5DA0DFFEB", +"2X c #9CC3DBE4FF4F", +"3X c #B8B3C925E909", +"4X c #B90BD45AEC3E", +"5X c #A40ACD18FDBD", +"6X c #A8BBCC8EF96F", +"7X c #B35CCD61F2CE", +"8X c #A9F9D684F617", +"9X c #A41ED505FDF8", +"0X c #AC7FD40EFEED", +"qX c #A452DC6FFEB8", +"wX c #AC1FDCD4FEA3", +"eX c #B801D868F76E", +"rX c #B3BAD5F5FF87", +"tX c #B4ABDCCBFF96", +"yX c #BC86DC74FFB1", +"uX c #A777E110FFCF", +"iX c #AC95E221FFC4", +"pX c #BCBCE0E0F6F6", +"aX c #B4E6E461FFAF", +"sX c #BC4AE4F3FFCF", +"dX c #BF52E8FBFFFF", +"fX c #D0AAC90BD064", +"gX c #E9DBCF5DCC4B", +"hX c #FBBFCC35C3F0", +"jX c #FAA7D605CAA2", +"kX c #FBF4DC36CE44", +"lX c #FC54DDA0D251", +"zX c #F8ABDBA4D829", +"xX c #CACAE1E1DEDE", +"cX c #F63AEB43CF94", +"vX c #FB6EE2B6D7C3", +"bX c #C518CB51E5A5", +"nX c #C325D58FEB1C", +"mX c #C5B8DBB1F576", +"MX c #C43CDED2FF14", +"NX c #EE7BD62EF2CF", +"BX c #C3DEE259F6D0", +"VX c #C48CE46AFF1D", +"CX c #CBC8E45EFFBF", +"ZX c #C4ADEA88FFC0", +"AX c #CC9CEC48FFDF", +"SX c #D2D2E791F49E", +"DX c #D2B0E72FFFF0", +"FX c #D464ECD8FFFA", +"GX c #DBC4ECF2FFFF", +"HX c #D68CF137FFFD", +"JX c #DCD8F2D5FFFF", +"KX c #E81AEAEAF258", +"LX c #E195EF78FFFF", +"PX c #F6B3EDB0F7A5", +"IX c #E2AAF363FFFF", +"UX c #EC2DF656FFFF", +/* pixels */ +"H H H H H H H H H H H H H H H H S n n M M B B M n B H J J H H H H H H H H J H H M H H S n n n n n n n n n n M M M H H H B n S J H S M M n n M M M M M M M M M H H Z M H H H H H H H H H H H H H S n n M M B B M n B H J J H H H H H H H H J H H M H H S n n n n n n n n n n M M M H H H B n S J H S M M n n M M M M M M M M M H H Z M H H H H H H H H H H H H H S n n M M B B M n B H J J H H H H H H H H J H H M H H S n n n n n n n n n n M M M H H H B n S J H S M M n n M M M M M M M M M H H Z M H H H H H H H H H H H H H S n n M M B B M n B H J J H H H H H H H H J H H M H H S n n n n n n n n n n M M M H H H B n S J H S M M n n M M M M M M M M M H H Z M H H H H H H H H H H H H H S n n M M B B M n B H J J H H H H H H H H J H H M H H S n n n n n n n n n n M M M H H H B n S J H S M M n n M M M M M M M M M H ", +"H H H H H H H H H H H H H H H A M M S A H H H A B M S H H J H H H H H H H H H H M H H S n n n n n M M B B A A B M A J H Z B A J H B M A A S B M M n n M M M M H H S M H H H H H H H H H H H H A M M S A H H H A B M S H H J H H H H H H H H H H M H H S n n n n n M M B B A A B M A J H Z B A J H B M A A S B M M n n M M M M H H S M H H H H H H H H H H H H A M M S A H H H A B M S H H J H H H H H H H H H H M H H S n n n n n M M B B A A B M A J H Z B A J H B M A A S B M M n n M M M M H H S M H H H H H H H H H H H H A M M S A H H H A B M S H H J H H H H H H H H H H M H H S n n n n n M M B B A A B M A J H Z B A J H B M A A S B M M n n M M M M H H S M H H H H H H H H H H H H A M M S A H H H A B M S H H J H H H H H H H H H H M H H S n n n n n M M B B A A B M A J H Z B A J H B M A A S B M M n n M M M M H ", +"H H H H H H H H H H H H H H H B M A H H H H H J H S M A J H H H J H J J H H H H M A H H B M M B B Z A H H A B M n S H H J H J J A M n B Z H H H A Z B M n M A H J B M H H H H H H H H H H H H B M A H H H H H J H S M A J H H H J H J J H H H H M A H H B M M B B Z A H H A B M n S H H J H J J A M n B Z H H H A Z B M n M A H J B M H H H H H H H H H H H H B M A H H H H H J H S M A J H H H J H J J H H H H M A H H B M M B B Z A H H A B M n S H H J H J J A M n B Z H H H A Z B M n M A H J B M H H H H H H H H H H H H B M A H H H H H J H S M A J H H H J H J J H H H H M A H H B M M B B Z A H H A B M n S H H J H J J A M n B Z H H H A Z B M n M A H J B M H H H H H H H H H H H H B M A H H H H H J H S M A J H H H J H J J H H H H M A H H B M M B B Z A H H A B M n S H H J H J J A M n B Z H H H A Z B M n M A H ", +"H H H H H H H H A A Z Z A H H M A H H H Z S Z H H H B B J H A A A A H H H J H H M B H H H A H H H H H Z B M B S B M Z H H J J A B M S B M B S A J J J H H H J H A M M H H H H H A A Z Z A H H M A H H H Z S Z H H H B B J H A A A A H H H J H H M B H H H A H H H H H Z B M B S B M Z H H J J A B M S B M B S A J J J H H H J H A M M H H H H H A A Z Z A H H M A H H H Z S Z H H H B B J H A A A A H H H J H H M B H H H A H H H H H Z B M B S B M Z H H J J A B M S B M B S A J J J H H H J H A M M H H H H H A A Z Z A H H M A H H H Z S Z H H H B B J H A A A A H H H J H H M B H H H A H H H H H Z B M B S B M Z H H J J A B M S B M B S A J J J H H H J H A M M H H H H H A A Z Z A H H M A H H H Z S Z H H H B B J H A A A A H H H J H H M B H H H A H H H H H Z B M B S B M Z H H J J A B M S B M B S A J J J H H H J H ", +"H H H H H H H S M M M M M S A M H H A B n M M S H H S B H B M n M M B A H H H H S M S H J H J H A S M M B A H A B M M B S Z S M M M Z H A S B M B A H H H H H A B M B H H H H S M M M M M S A M H H A B n M M S H H S B H B M n M M B A H H H H S M S H J H J H A S M M B A H A B M M B S Z S M M M Z H A S B M B A H H H H H A B M B H H H H S M M M M M S A M H H A B n M M S H H S B H B M n M M B A H H H H S M S H J H J H A S M M B A H A B M M B S Z S M M M Z H A S B M B A H H H H H A B M B H H H H S M M M M M S A M H H A B n M M S H H S B H B M n M M B A H H H H S M S H J H J H A S M M B A H A B M M B S Z S M M M Z H A S B M B A H H H H H A B M B H H H H S M M M M M S A M H H A B n M M S H H S B H B M n M M B A H H H H S M S H J H J H A S M M B A H A B M M B S Z S M M M Z H A S B M B A H H H H H A ", +"H H H H J H B M B Z A A S M B M H H Z n n n M M H H S B B B S A A Z B M Z H H H H B n B Z A S B M M B A H H S M M Z M M M n M n B B M B A H H A B M M S Z Z B M M A H H J H B M B Z A A S M B M H H Z n n n M M H H S B B B S A A Z B M Z H H H H B n B Z A S B M M B A H H S M M Z M M M n M n B B M B A H H A B M M S Z Z B M M A A H J H B M B Z A A S M B M H H Z n n n M M H H S B B B S A A Z B M Z H H H H B n B Z A S B M M B A H H S M M Z M M M n M n B B M B A H H A B M M S Z Z B M M A H H J H B M B Z A A S M B M H H Z n n n M M H H S B B B S A A Z B M Z H H H H B n B Z A S B M M B A H H S M M Z M M M n M n B B M B A H H A B M M S Z Z B M M A A H J H B M B Z A A S M B M H H Z n n n M M H H S B B B S A A Z B M Z H H H H B n B Z A S B M M B A H H S M M Z M M M n M n B B M B A H H A B M M S Z Z B M ", +"H H H J H B M Z H H H H H A M n H H A n n M n M H J B n B H H H H H H B M S H H J H S B B B n M S A J H F B n M S A M S B B F B S A M n M S H J H A B M n B B S A J H J H B M Z H H H H H A M n H H A n n M n M H J B n B H H H H H H B M S H H J H S B B B n M S A J H A B n M S A M S B B A B S A M n M S H J H A B M n B B S A J H J H B M Z H H H H H A M n H H A n n M n M H J B n B H H H H H H B M S H H J H S B B B n M S A J H A B n M S A M S B B A B S A M n M S H J H A B M n B B S A J H J H B M Z H H H H H A M n H H A n n M n M H J B n B H H H H H H B M S H H J H S B B B n M S A J H A B n M S A M S B B A B S A M n M S H J H A B M n B B S A J H J H B M Z H H H H H A M n H H A n n M n M H J B n B H H H H H H B M S H H J H S B B B n M S A J H A B n M S A M S B B A B S A M n M S H J H A B M n B B S ", +"H H H H S M S H H H A H H H S M A H A n n M n B H H B M A H H A A H J H B M A J H H J J A B B H H H F B M M n B K S M K B B K S B H S M M n M S H J J A B S H J H H H H S M S H H H A H H H S M A H A n n M n B H H B M A H H A A H J H B M A J H H J J A B B H H H A B M M n B H S M H B B H S B H S n M n M S H J J A B S H J H H H H S M S H H H A H H H S M A H A n n M n B H H B M A H H A A H J H B M A J H H J J A B B H H H A B M M n B H S M H B B H S B H S n M n M S H J J A B S H J H H H H S M S H H H A H H H S M A H A n n M n B H H B M A H H A A H J H B M A J H H J J A B B H H H A B M M n B H S M H B B H S B H S n M n M S H J J A B S H J H H H H S M S H H H A H H H S M A H A n n M n B H H B M A H H A A H J H B M A J H H J J A B B H H H A B M M n B H S M H B B H S B H S n M n M S H J J A B S H J ", +"H H H A M B H J A B M M S H H M B H H M n n n S H A M S H H B M M B H J A M S H J H H H B M F H K S M M M M N F K M S K B M F K M F K B M M M M B F K H F M F J J H J A M B H J A B M M S H H M B H H M n n n S H A M S H H B M M B H J A M S H J H H H B M A H H S M n n M M A H M S H B n A A M A H B n M n n B A H H A M Z J J H J A M B H J A B M M S H H M B H H M n n n S H A M S H H B M M B H J A M S H J H H H B M A H H S M n n M M A H M S H B n A A M A H B n M n n B A H H A M Z J J H J A M B H J A B M M S H H M B H H M n n n S H A M S H H B M M B H J A M S H J H H H B M A H H S M n n M M A H M S H B n A A M A H B n M n n B A H H A M Z J J H J A M B H J A B M M S H H M B H H M n n n S H A M S H H B M M B H J A M S H J H H H B M A H H S M n n M M A H M S H B n A A M A H B n M n n B A H H A M Z J ", +"H H H Z M A J H M n n n M A J Z M A H B n n M A H S M A J S M n n n S H H B M H J H H F M F K K S M N N N N D K F N K K N N D P D B K F N N N N M M F K K B B K H H J F M A J H M n n n M A J Z M A H B n n M A H S M A J S M n n n S H H B M H J H H A M Z H H B M n n n n S H S M A A M n S H B B H A M n M n n M A H H B B H H H J Z M A J H M n n n M A J Z M A H B n n M A H S M A J S M n n n S H H B M H J H H A M Z H H B M n n n n S H S M A A M n S H B B H A M n M n n M A H H B B H H H J Z M A J H M n n n M A J Z M A H B n n M A H S M A J S M n n n S H H B M H J H H A M Z H H B M n n n n S H S M A A M n S H B B H A M n M n n M A H H B B H H H J Z M A J H M n n n M A J Z M A H B n n M A H S M A J S M n n n S H H B M H J H H A M Z H H B M n n n n S H S M A A M n S H B B H A M n M n n M A H H B B H ", +"H H H S M H H F M M n M M B H H M S H S M M M K H M B J F M M M M M B J J S N K P K K F N K P F N N N N N V L K V D K G N N V K G V L P D N N N N N D P K F V K P K K F N K K F M M n M M B H H M S H S M M M K H M B J F M M M M M B J J S M H J H H S M H H F M M M M M M K H B B H F M M B H F M F H B n M M M M B H H S M H H J J S M H H F M M n M M B H H M S H S M M M K H M B J F M M M M M B J J S M H J H H S M H H F M M M M M M K H B B H F M M B H F M F H B n M M M M B H H S M H J H H S M H H F M M n M M B H H M S H S M M M K H M B J F M M M M M B J J S M H J H H S M H H F M M M M M M K H B B H F M M B H F M F H B n M M M M B H H S M H H J J S M H H F M M n M M B H H M S H S M M M K H M B J F M M M M M B J J S M H J H H S M H H F M M M M M M K H B B H F M M B H F M F H B n M M M M B H H S M H ", +"P K P F M K K F M M M M M M F K S N K F M n B K F M F K B M M M M M B P K S V K P P P F N K P G N N ' ' ' G I G ' G I +.] ' ] L L ] +.I L ] ' ' ' N D I I D V P P P P F N K P F N M N M M M F K S N K F M n B K F M F K B M M M M M B P K S B K P K P F M K P F M M M M M S P F M F K B M M M K K B S P K M M M M M B K K S M K P K P F M K K F M M M M M M F K S N K F M n B K F M F K B M M M M M B P K S B K P K P F M K P F M M M M M S P F M F K B M M M K K B S P K M M M M M B K K S M K P K P F M K K F M M M M M M F K S N K F M n B K F M F K B M M M M M B P K S B K P K P F M K P F M M M M M S P F M F K B M M M K K B S P K M M M M M B K K S M K P K P F M K K F M M M M M M F K S N K F M n B K F M F K B M M M M M B P K S B K P K P F M K P F M M M M M S P F M F K B M M M K K B S P K M M M M M B K K S M K ", +"P P P F N F K P S N N N N N V K K N F K V m F K V V K F N N N N N V K P K V D P P P I G ' G I I +.' ' ' +.,.,.+.+.,.,.+.] [ ] :.,.#.+.:.,.#.] ' ' ] :.I I ] +.I I I P L V G P P D N N N N N V K K N F K V m F K V V K F N N N N N B K P K N D P P K P F N F P K V N N N V K K V V K K V N N N F K S V K K F N N N N F P K V V K P P P F N F K P S N N N N N V K K N F K V m F K V V K F N N N N N B K P K N D P P K P F N F P K V N N N V K K V V K K V N N N F K S V K K F N N N N F P K V V K P P P F N F K P S N N N N N V K K N F K V m F K V V K F N N N N N B K P K N D P P K P F N F P K V N N N V K K V V K K V N N N F K S V K K F N N N N F P K V V K P P P F N F K P S N N N N N V K K N F K V m F K V V K F N N N N N B K P K N D P P K P F N F P K V N N N V K K V V K K V N N N F K S V K K F N N N N F P K V V K ", +"P P K K D V K P P F V N N N N D P D V P V N F K N F K V N N N V F P P P D V L I I I I I ] +.,.I :.+.+.#.,.,.:.[ $.,.>.@.[ [ [ $.,.,.[ $.,.,.$.@.@.:.,.,.#.] #.I I I I I D ] L P P G V N N N N D P D V P V N F K N F K V N N N V F P P K V N K P P P P K V V K P K D V D K P F N D P F N N N N D K K N D P K D V V F P P F N F P P P K K D V K P P F V N N N N D P D V P V N F K N F K V N N N V F P P K V N K P P P P K V V K P K D V D K P F N D P F N N N N D K K N D P K D V V F P P F N F P P P K K D V K P P F V N N N N D P D V P V N F K N F K V N N N V F P P K V N K P P P P K V V K P K D V D K P F N D P F N N N N D K K N D P K D V V F P P F N F P P P K K D V K P P F V N N N N D P D V P V N F K N F K V N N N V F P P K V N K P P P P K V V K P K D V D K P F N D P F N N N N D K K N D P K D V V F P P F N F P ", +"P P P K G V V L P P K G N N N N G L N L D V P D V K D N N N D L I I L D ] L L I I ,.,.,.#.[ #.,.,.,.<.<.<.<.$.[ <.a.>.[ &.[ &.=.<.a.=.&.>.a.<.<.<.,.,.<.@.@.,.,.,.,.,.:.:.] +.L I I L G ' ' ' N G L N L D V P D V K D N N N D K P P L D V G K K P P P P G N D P P K P P P K V N L P G N N N N V K P V N L P P P P P P L V V L P P P P K G V V L P P K G N N N N G L N L D V P D V K D N N N D K P P L D V G K K P P P P G N D P P K P P P K V N L P G N N N N V K P V N L P P P P P P L V V L P P P P K G V V L P P K G N N N N G L N L D V P D V K D N N N D K P P L D V G K K P P P P G N D P P K P P P K V N L P G N N N N V K P V N L P P P P P P L V V L P P P P K G V V L P P K G N N N N G L N L D V P D V K D N N N D K P P L D V G K K P P P P G N D P P K P P P K V N L P G N N N N V K P V N L P P P P P P L V V L P ", +"P L D V V V N V D G L P L D N N V L V D D V D V D G V N D L I I L D ] ' ] ] ] ] :.,.,.,.,.$.[ $.<.<.a.a.3.=.&.&.3.s.2.&.&.&.&.=.s.s.2.&.=.3.s.a.a.a.>.&.&.>.<.,.,.:.$.[ [ [ [ ] +.:.I I L +.' ' +.L V D D V D V D G V N D L P I L D V N V V V V L P I I L D N D L I P P L V V V L P G N N N N V I I D N V G I P P P G V V L P P P L D V V V N V D G L P L D N N V L V D D V D V D G V N D L P I L D V N V V V V L P I I L D N D L I P P L V V V L P G N N N N V I I D N V G I P P P G V V L P P P L D V V V N V D G L P L D N N V L V D D V D V D G V N D L P I L D V N V V V V L P I I L D N D L I P P L V V V L P G N N N N V I I D N V G I P P P G V V L P P P L D V V V N V D G L P L D N N V L V D D V D V D G V N D L P I L D V N V V V V L P I I L D N D L I P P L V V V L P G N N N N V I I D N V G I P P P G V V L P P ", +"L ] ] G L L L G D ' +.G I I L +.' D ] ' ] ] ] ' D ] ] G I I G +.] ] +.:.,.,.:.$.[ $.<.<.<.a.2.&.&.=.2.2.*.-.4.-.s.s.4.*.*.*.*.-.d.s.4.-.-.*.-.3.2.=.*.&.3.a.a.<.<.@.@.$.>.<.:.:.@.[ +.#.,.I L +.' +.] ' ] ] ] ' D ] ] G I I G +.] ] D L I I L D ' D I I I I G ' ] D D D ] ] G ] I I G ' ' ' ' ] I I G ] D ' D G G +.] ] L I I I L ] ] G L L L G D ' +.G I I L +.' D ] ' ] ] ] ' D ] ] G I I G +.] ] D L I I L D ' D I I I I G ' ] D D D ] ] G ] I I G ' ' ' ' ] I I G ] D ' D G G +.] ] L I I I L ] ] G L L L G D ' +.G I I L +.' D ] ' ] ] ] ' D ] ] G I I G +.] ] D L I I L D ' D I I I I G ' ] D D D ] ] G ] I I G ' ' ' ' ] I I G ] D ' D G G +.] ] L I I I L ] ] G L L L G D ' +.G I I L +.' D ] ' ] ] ] ' D ] ] G I I G +.] ] D L I I L D ' D I I I I G ' ] D D D ] ] G ] I I G ' ' ' ' ] I I G ] D ' D G G +.] ] L I I I ", +"+.] L I I I I I I L +.] ] +.L I +.' ] G L I L +.' ] L I #.+.] ] #.:.,.,.,.,.,.<.$.&.=.<.a.s.s.3.-.-.-.-.-.4.4.9.d.d.d.w.9.9.9.r.d.f.w.9.d.-.-.-.-.-.4.s.s.s.s.s.=.&.2.a.a.a.<.<.,.:.$.[ [ #.:.,.+.' ] #.L I L +.' ] L I G +.] ] #.L I I I I I I +.' #.I I I I L +.] ] +.+.L L ] L I L +.] ' ] G I I +.+.I +.] ] ] ] #.I I I I I +.] L I I I I I I L +.] ' +.L L +.' ' G L L L +.' ] L I G ] ] ] G L I I I I I I +.' D L I I I G +.] ] ] +.L L ] L L L +.] ' ] G I I +.+.I +.] ] ] ] #.I I I I I +.] L I I I I I I L +.] ] +.L I +.' ] G L I L +.' ] L I G +.] ] #.L I I I I I I +.' #.I I I I L +.] ] +.+.L L ] L I I +.] ' ] L I I +.+.I +.] ] ] ] #.I I I I I +.] L I I I I I I L +.] ] +.L I +.' ] G L I L +.' ] L I G +.] ] #.L I I I I I I +.' #.I I I I L +.] ] +.+.L L ] L I I +.] ' ] L I I +.+.I +.] ] ] ] #.I I I I I ", +"] #.I I :.:.:.:.I I I :.#.+.] +.] ] :.I I I I I #.' +.] ] +.:.,.,.,.,.>.>.>.<.a.<.&.&.s.s.s.d.d.d.d.d.j.f.l.j.9.r.l.l.j.j.j.j.l.l.j.e.r.l.l.j.j.j.f.f.d.d.d.d.s.-.2.s.s.3.2.>.<.<.<.<.<.>.@.[ @.[ +.:.,.,.,.,.I #.' +.] ] +.:.I I I :.:.#.#.I I I ] ] I I I I I I I :.:.I I I ] #.I I L L L L I I L ] #.I I I :.:.I I I I I I I ] #.I I L G G L I I I L G ] ] ] ' ] L I L I I I +.' +.] ] +.G I I L L G G G L I L ] ] L I I I I I L L L I I L ] D I I L L L L I I L ] #.I I I L L I I I I I I I ] #.I I :.:.:.:.I I I :.#.+.] +.] ] :.I I I I I #.' +.] ] +.:.I I I :.:.#.#.I I I ] ] I I I I I I I :.:.I I I ] #.I I I I :.I I I :.] #.I I I :.:.I I I I I I I ] #.I I :.:.:.:.I I I :.#.+.] +.] ] :.I I I I I #.' +.] ] +.:.I I I :.:.#.#.I I I ] ] I I I I I I I :.:.I I I ] #.I I I I :.I I I :.] #.I I I :.:.I I I I I I I ", +"[ :.,.:.+.] ] [ +.+.#.:.,.,.:.+.' :.,.,.,.,.,.,.,.+.[ #.:.,.,.:.$.@.@.&.[ &.=.s.s.2.*.d.d.d.f.f.j.l.l.l.l.l.l.t.e.k.z.z.z.z.z.z.k.e.y.k.z.z.l.l.l.l.l.l.j.f.d.d.9.d.d.4.-.*.*.&.&.=.2.<.<.<.>.@.[ >.,.,.,.,.,.,.,.+.] #.:.,.,.:.#.+.[ ] ] ] #.,.,.#.[ ,.,.,.,.,.,.,.,.I I ,.I +.] #.L I I I I I :.] ] :.I ,.I I ,.,.,.,.,.,.,.,.] :.I :.] ' ' ] ] +.#.:.L L #.] ' #.I I I :.I I :.+.] #.:.I I :.#.] ] ' ' ' +.I L +.' L L L I I L I I I L L I +.' #.L L L L L I #.] ] :.I I I I I I I I I I ,.,.[ :.,.:.+.] ] [ +.+.#.:.,.,.:.+.' :.,.,.,.,.,.,.,.+.] #.:.,.,.:.#.+.[ ] ] ] #.,.,.#.[ ,.,.,.,.,.,.,.,.,.,.,.,.#.[ #.,.,.,.,.,.,.:.+.[ :.,.,.,.,.,.,.,.,.,.,.,.,.[ :.,.:.+.] ] [ +.+.#.:.,.,.:.+.' :.,.,.,.,.,.,.,.+.] #.:.,.,.:.#.+.[ ] ] ] #.,.,.#.[ ,.,.,.,.,.,.,.,.,.,.,.,.#.[ #.,.,.,.,.,.,.:.+.[ :.,.,.,.,.,.,.,.,.,.,.,.,.", +"[ ,.,.#.[ [ [ [ [ [ [ [ @.#.:.+.[ ,.,.,.+.+.:.,.,.#.[ #.$.@.@.[ [ [ [ &.&.&.*.s.d.4.9.d.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X#X&X,X1X2XqXqXuXiXeX% Y.K.P.K.P.K.K.P.L.A.- R.]._.|.}.'.}.'./.R.}.).].R.zXU.kXlXkXN.`.}.h zX/.{.V.H.L.K.K.P.K.K.K.K.P.P.N.{.{.'.'.'.'.'.'.{.'.NXV.0XwXqX2X2X1X,X*X+X#X-X-XM.M.M.M.b.b.b.b.c.h.h.q.w.7.R r 7 7 7 7 1 < q n.n.n.n.9 2 p E E d 2 2 n.n.n.n.3 w R } } } } } } i 2 w n.n.n.w < q U ....5.7.7.7.7.7.5.} } 5.5...E p 2 q n.n.n.w < q U ....5.7.7.7.7.7.5.7.7.7.} } } } } } d 8 2 n.n.n.7 3 E 7.7.q.w.h.h.y.q.t.t.w.q.q.5.} } d 2 2 n.n.n.2 2 U E U 2 2 n.n.n.n.3 w E ..} } _ ......^ E p 8 < 1 2 2 2 2 2 2 w n.n.n.n.n.1 3 w 1 1 n.n.n.2 2 a E E _ U 2 2 n.n.n.2 2 U ...._ d w 2 n.n.n.2 2 d E E d q < q n.n.n.n.n.n.n.n.3 2 U 5.7.7.w.q.q.u.c.c.b.b.c.i.y.c.b.b.b.b.b.b.b.b.b.b.b.b.b.y.b.b.c.y.y.y.y.y.y.y.u.i.c.b.i.y.b.b.b.c.i.b.b.b.i.y.c.c.c.i.u.y.y.y.y.y.y.y.b.", +"b.b.b.b.b.b.b.b.b.b.b.b.b.m.n.i.i.n.M.-X-X-X;X;X,X*X=X<X2XqXuXiXaXN.H.P.K.L.K.P.P.H.- V.).j `.'.`.`.[.[.[.[.h `.}.}.`.C.lXA.vXkXzXD.`.].h PXg }.].C.U.L.K.P.K.J.K.K.K.K.- [.|.`.`.`.`.`.[.[.[.PXPXE.iXqXqX2X1X1X1X#X+X#X-X-X-XM.M.n.b.b.c.c.h.h.q.w...t < 1 7 7 8 9 w v.v.v.v.w > w R E E R w 2 v.v.v.v.2 2 d ..5.5.} } } d 2 3 v.v.v.v.q < q p R E ..7.7.7.7.5.} 5.7.5.5...R 3 2 v.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.~.#X-X#X~.#X-X+X+X~.+X-X-X+X#X-X-X+X~.~.~.~.+X-X-X#X+X-X", +";X;X;X;X+X#X;X;X#X+X+X&X&X&X&X,X1X=X<X2X5X5X9XwX0X7XaXsXo NX`.`.j `._.].j ].|.}.].].R.].}.{.}._.g D.D.lXB.`.x vXkXkXgXgXlXlXlXlXlXlXkXzXV.g vXkXkXzXg R.|.'.}.|.'.].].R.R.N.U.N.'.}.].'.g ].}.].}.}.'.V.yXyXtXiX0X0XqX9X=X=X&X&X&X+XOXOXOX6.W 9 r G G G G G r < r W | 6.6.8.8.6.6./ ! Q d r 9 9 9 9 9 9 t G G G G G 7 7 U Q a 7 1 G G G 1 7 U ! ! Q f i 1 7 G G G G 9 9 W | 5.R 7 1 G G G 1 7 a Q ! ! R i 1 7 G G G G 9 7 Q 8.8.6.| a 7 r G G 7 7 Q 6.6.6.6.6.8.8.8.6.8.8.6.! a 0 < r G G G G w 9 U / 5.| Q 9 9 G G G 9 r ! 6.8.8.6.8.8.~ r 9 G G G G r < 0 a f a 0 < t G G G 9 9 Q 5.6.| U w 9 G G G G G G G G G G G G G G G r 9 7 r G G G G 1 > > > q G G r 9 9 9 9 9 7 9 t G G G G 9 y | 8.g.OX!.OX@X!.!.#X;X+X+X;X#X+X+X+X!.+X+X;X;X;X+X#X;X;X;X;X#X+X#X;X;X+X+X+X!.+X;X;X+X+X;X;X+X+X!.+X#X;X#X+X;X;X#X+X!.+X+X#X;X;X+X+X;X", +";X;X;X;X#X+X;X;X;X;X*X&X&X&X&X*X1X=X=X2X9X5XwXwXrXaXaX3X+ `.'.].j ].{.].j }.}.}.].].j ].}.'.].x D.kXlXlXN.`.g vXkXkXU.jXkXlXlXlXlXlXlXzXN.+ vXkXlXlXzXV.j '.}.}.}.}.}.R.).`.R.`.{.}.}.'.6 `.}.].].{.}.R.yXyXaXaX0XwXqX9X5X=X=X&X*X#XoXOX!.| i 7 G G G G G r < r Q 6.6.8.8.g.8.q.8.g.8.6.6.~ Q Q ! ! a r < t G G G G 7 7 a Q a 7 7 G G G 7 7 U ! ! ! ! f 7 7 G G G G 7 9 W | 5.R 7 7 G G G 7 7 a ! / / / U 7 9 G G G G 9 9 Q 8.8.8.! r 7 G G G 7 1 U / 6.6.6.6.6.8.8.| ! ! U t 9 9 t G G G G r < t ! 6.6.6.Q 9 7 G G r 9 f 6.6.8.8.8.8.8.6.f 9 t G G G G r 7 7 7 9 9 t G G G G 9 9 Q 8.6.6.| U 9 r G G G G G G G G t 9 r G G G G G G G G G G q > > > 1 G G G G G t 9 9 9 r G G G G G r 9 f 6.W.!.OXOXOX-X+X!.;X;X+X;X;X+X+X+X+X+X#X;X:X;X#X+X;X;X;X;X;X;X+X+X;X;X;X#X+X#X;X;X;X+X#X;X;X+X+X+X+X#X;X;X+X#X;X;X#X+X+X#X;X;X#X+X#X:X", +";X;X:X;X;X&X&X;X:X:X,X*X&X&X&X=X<X<X5XqX9X0XiXwXrXaXsXC.(.{.{.[.T.'.{.'.R.].}.}.}.).j ].).R.R.6 vXkXlXkXN.`.gXlXkXkXD.lXlXlXlXlXlXlXlXlXU.g vXlXlXlXlXV.[.R.R.).].}.|.R.].{.].}.}.}.}.{.g `.{.}.].].].R.E.yXaXtXrXwX9X5X5X=X=X,X,X;XoX!.!.~ 0 > r F F F r < r Q 8.8.8.g.g.g.Q.W..Xg.Q.W.W.W.W.8.8.8.6.f 7 2 F F F F 7 1 i W a 7 7 F F F w 7 i ! / / ! a 1 7 F F F F 7 9 W | 6.W 7 9 F F F e 7 a ! / ! ! a 2 9 F F F F 9 9 Q 6.8.8.! 9 9 F F F r < w a W Q Q Q Q ! ! a r 9 9 9 t F F F F F r < r Q 6.8.8.8.Q 9 > 7 7 < y ~ 6.W.W.Q.8.W.8.8.| y 9 F F F F F F r 9 t F F F F F F 9 9 ! 8.8.6.6.! i 9 9 t F F F F F r < < < 0 F F F F F F F F q < 2 9 2 9 F F F F F F F F F F F F F F r < y | W.W.!.OXOX!.#X#X+X;X#X&X;X#X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IXLXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXIXLXIXIXIXLXLXLXLXIXIXIXLXIXIXIXIXIXIXIXIXIXIXLXIXIX" +}; diff --git a/assdraw/src/xpm/b__xpm.xpm b/assdraw/src/xpm/b__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..b3343e00d3cddfca275cb23a25c91a70e9b4f796 --- /dev/null +++ b/assdraw/src/xpm/b__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *b__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XX XXXX", +"XXXXX XXX", +"XXXXX XXXX XXX", +"XXXXX XXXX XXX", +"XXXXX XXXX", +"XXXXX XXX", +"XXXXX XXXX XXX", +"XXXXX XXXX XXX", +"XXXXX XXX", +"XXXXX XXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/c__xpm.xpm b/assdraw/src/xpm/c__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..3fb56e6413857653ca4d2770f6f2dc6499fbc6ee --- /dev/null +++ b/assdraw/src/xpm/c__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *c__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XXXX XXXXX", +"XXXXXX XXXX", +"XXXXX XX XXX", +"XXXXX XXXX XXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXX XXXX", +"XXXXX XX XXX", +"XXXXXX XXXX", +"XXXXXXX XXXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/check__xpm.xpm b/assdraw/src/xpm/check__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..9da7d46731259736a5ad9999474eb82197d80142 --- /dev/null +++ b/assdraw/src/xpm/check__xpm.xpm @@ -0,0 +1,27 @@ +/* XPM */ +const char *check_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 6 1", +" c black", +". c gray25", +"X c #808080808080", +"o c #D4D4D0D0C8C8", +"O c gray100", +"+ c None", +/* pixels */ +"++++++++++++++++", +"++XXXXXXXXXXXX++", +"++X..........o++", +"++X.OOOOOOOOOo++", +"++X.OOOOOOO Oo++", +"++X.OOOOOO Oo++", +"++X.O OOO Oo++", +"++X.O O OOo++", +"++X.O OOOo++", +"++X.OO OOOOo++", +"++X.OOO OOOOOo++", +"++X.OOOOOOOOOo++", +"++Xooooooooooo++", +"++++++++++++++++", +"++++++++++++++++" +}; diff --git a/assdraw/src/xpm/del__xpm.xpm b/assdraw/src/xpm/del__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..d03abec061f697fc72043176136264cfa3acd99a --- /dev/null +++ b/assdraw/src/xpm/del__xpm.xpm @@ -0,0 +1,90 @@ +/* XPM */ +const char *del__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 69 1", +" c black", +". c #0C0C0C0C0C0C", +"X c gray5", +"o c gray9", +"O c #191919191919", +"+ c gray11", +"@ c #262625252424", +"# c #313131313131", +"$ c #323232323232", +"% c #353534343232", +"& c #373735353333", +"* c #373737373737", +"= c #383838383737", +"- c #3E3E3E3E3E3E", +"; c #414141414141", +": c #575755555252", +"> c #555555555555", +", c #5D5D5A5A5757", +"< c gray35", +"1 c gray36", +"2 c #646464646464", +"3 c gray42", +"4 c #70706E6E6A6A", +"5 c #71716F6F6B6B", +"6 c #818181818181", +"7 c #868686868686", +"8 c #878787878686", +"9 c #888888888787", +"0 c #8F8F8C8C8787", +"q c gray55", +"w c #8F8F8E8E8D8D", +"e c #979793938D8D", +"r c gray57", +"t c #969695959292", +"y c gray59", +"u c #9F9F9F9F9F9F", +"i c #A3A39F9F9999", +"p c #A0A0A0A0A0A0", +"a c gray64", +"s c #AAAAA6A6A0A0", +"d c #AEAEACACA7A7", +"f c #A9A9A9A9A9A9", +"g c #B1B1AEAEA7A7", +"h c #B3B3B0B0A9A9", +"j c #B7B7B4B4ADAD", +"k c #B9B9B7B7B1B1", +"l c #BEBEBBBBB5B5", +"z c #BCBCBCBCBCBC", +"x c #C2C2BFBFB8B8", +"c c #C3C3C0C0B8B8", +"v c #C3C3C0C0B9B9", +"b c #C7C7C3C3BBBB", +"n c #C6C6C3C3BCBC", +"m c gray78", +"M c #CBCBC8C8C0C0", +"N c #CFCFCBCBC4C4", +"B c #C8C8C8C8C8C8", +"V c gray80", +"C c #D2D2CECEC6C6", +"Z c #D3D3CFCFC7C7", +"A c #D0D0D0D0D0D0", +"S c LightGray", +"D c gray86", +"F c #DDDDDDDDDDDD", +"G c gray90", +"H c gray93", +"J c #F4F4F4F4F4F4", +"K c #F6F6F6F6F6F6", +"L c None", +/* pixels */ +"LLLLN*LLLLLLLLLL", +"LLLLk=0LLLLLLLLL", +"LLLZt &LLLLLLLLL", +"LLLv9<-iLLLLLLLL", +"LLZtB1p%LL L", +"LLlyH1F$eLLLLLLL", +"LCwAH1Ff@cLLLLLL", +"LdaJHuFS>5LLLLLL", +"n8KJH FSm+sLLLLL", +"LrqJHDFS3:xLLLLL", +"Lb#DHGFzohLLLLLL", +"LL46HGF2,LLLLLLL", +"LLgOHGF LLLLLLLL", +"LLX..X...LLLLLLL", +"LLM;V7.XjLLLLLLL" +}; diff --git a/assdraw/src/xpm/del_cross_xpm.xpm b/assdraw/src/xpm/del_cross_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..fea2c7c9920f17ea5c65d84f9df1b7b7f5da90d3 --- /dev/null +++ b/assdraw/src/xpm/del_cross_xpm.xpm @@ -0,0 +1,106 @@ +/* XPM */ +const char *delcross_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 85 1", +" c #3F3F14141818", +". c #4C4C19192121", +"X c #656522222626", +"o c #797927272C2C", +"O c #6E6E24243333", +"+ c #82822A2A2D2D", +"@ c #919130303434", +"# c #949431313535", +"$ c #979732323434", +"% c #979732323B3B", +"& c #9E9E35353D3D", +"* c #9E9E34343F3F", +"= c #A0A036363939", +"- c #A5A538383C3C", +"; c #A7A73A3A3E3E", +": c #ACAC3B3B3E3E", +"> c #B5B53D3D3D3D", +", c #9E9E34344848", +"< c #A5A539394242", +"1 c #AEAE3D3D4040", +"2 c #A3A337374D4D", +"3 c #B7B73F3F4343", +"4 c #B3B33F3F4747", +"5 c #B5B53F3F4545", +"6 c #B3B33C3C5353", +"7 c #B1B13D3D5454", +"8 c #B3B33C3C5656", +"9 c #B5B53D3D5959", +"0 c #B7B740404141", +"q c #BDBD42424545", +"w c #B7B741414848", +"e c #B3B340405C5C", +"r c #BFBF45455E5E", +"t c #C3C345454C4C", +"y c #D0D04B4B5252", +"u c #C9C948486666", +"i c #CFCF4B4B6868", +"p c #D0D04C4C6A6A", +"a c #D2D24C4C6C6C", +"s c #E4E457577575", +"d c #E2E258587676", +"f c #E7E75B5B7979", +"g c #EAEA5B5B7A7A", +"h c #E8E85C5C7979", +"j c #EAEA5C5C7A7A", +"k c #F1F160607B7B", +"l c #F1F162627F7F", +"z c #F4F464648080", +"x c #F6F666668080", +"c c #F5F564648282", +"v c #F7F766668585", +"b c #FAFA69698484", +"n c #FFFF6D6D8686", +"m c #FCFC6B6B8888", +"M c #FFFF6D6D8989", +"N c #FFFF6F6F8B8B", +"B c #FFFF71718989", +"V c #FFFF74748F8F", +"C c #FFFF83839B9B", +"Z c #FFFF89899B9B", +"A c #FFFF89899D9D", +"S c #FFFF8D8DA2A2", +"D c #FFFF9393A5A5", +"F c #FFFF9595A6A6", +"G c #FFFF9E9EA7A7", +"H c #FFFFA6A6ABAB", +"J c #FFFFA5A5B1B1", +"K c #FFFFAFAFB1B1", +"L c #FFFFADADB4B4", +"P c #FFFFB0B0B2B2", +"I c #FFFFB0B0B9B9", +"U c #FFFFB5B5B8B8", +"Y c #FFFFB4B4BCBC", +"T c #FFFFBBBBBBBB", +"R c #FFFFBCBCBBBB", +"E c #FFFFB8B8BDBD", +"W c #FFFFC0C0BEBE", +"Q c #FFFFC0C0C2C2", +"! c #FFFFC4C4C2C2", +"~ c #FFFFC3C3C4C4", +"^ c #FFFFC4C4C7C7", +"/ c #FFFFC7C7C6C6", +"( c #FFFFC7C7C7C7", +") c #FFFFCCCCC9C9", +"_ c None", +/* pixels */ +"_^jY____________", +"_DqtJ________S__", +"_Fh;5C_____Iym__", +"__Eg10l___c4V___", +"____Aw3vQN>M____", +"_____~p-&<d_____", +"______L%:7______", +"_____(9@#=6_____", +"____/8+sUa$Z____", +"___)eXi___z*/___", +"___fO2T____rx___", +"__G.oB_____W,!__", +"__n uR______bK__", +"__PkH___________", +"________________" +}; diff --git a/assdraw/src/xpm/help__xpm.xpm b/assdraw/src/xpm/help__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..6bf95c368bb79e70dbcedc8f892d284104391030 --- /dev/null +++ b/assdraw/src/xpm/help__xpm.xpm @@ -0,0 +1,32 @@ +/* XPM */ +const char *help__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 11 1", +" c #46464B4B5C5C", +". c #FFFFCCCC0000", +"X c #FAFAF3F30000", +"o c #FBFBE2E24949", +"O c #4C4C2D2D9B9B", +"+ c #7A7A7E7E8D8D", +"@ c #59594F4FBFBF", +"# c #65655B5BEFEF", +"$ c #FFFFFFFFABAB", +"% c #82829494F7F7", +"& c None", +/* pixels */ +"&&&&++++++++&&&&", +"&&++XXXXXXXo &&", +"&+XX$$@@@@$$X. &", +"&+X$$@@%#@@$$X +", +"+X$$$@#$$@@$$$o ", +"+X$$$$$$%@O$$$X ", +"+X$$$$$%@O$$$$X ", +"+X$$$$$@O$$$$$o ", +"+X$$$$$$$$$$$Xo ", +"+oX$$$$@@$$$$X. ", +"&+XX$$$@@$$XX. &", +"&& oXX$$$$Xo. &&", +"&&& oXXXo &&&", +"&&&&&& &&&&&", +"&&&&&&&&&&&&&&&&" +}; diff --git a/assdraw/src/xpm/help_xpm.xpm b/assdraw/src/xpm/help_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..e07db5e5537a23858683248500fb43c908efb753 --- /dev/null +++ b/assdraw/src/xpm/help_xpm.xpm @@ -0,0 +1,71 @@ +/* XPM */ +const char *help_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 50 1", +" c #25254A4A8787", +". c #27274D4D8D8D", +"X c #282850509292", +"o c #2A2A53539898", +"O c #2A2A54549A9A", +"+ c #2B2B55559B9B", +"@ c #2D2D5959A3A3", +"# c #2D2D5A5AA5A5", +"$ c #2E2E5C5CA8A8", +"% c #33336666BBBB", +"& c #35356A6AC1C1", +"* c #36366B6BC2C2", +"= c #37376E6EC9C9", +"- c #43437777CDCD", +"; c #48487B7BCECE", +": c #4E4E7F7FD0D0", +"> c #52528282D0D0", +", c #63638E8ED5D5", +"< c #69699292D7D7", +"1 c #71719898D9D9", +"2 c #79799E9EDBDB", +"3 c #7C7CA0A0DCDC", +"4 c #8989A9A9DFDF", +"5 c #8C8CACACE0E0", +"6 c #9595B2B2E3E3", +"7 c #9A9AB6B6E4E4", +"8 c #9B9BB7B7E5E5", +"9 c #A6A6BFBFE8E8", +"0 c #A8A8C0C0E8E8", +"q c #ADADC4C4E9E9", +"w c #B1B1C7C7EBEB", +"e c #B8B8CCCCECEC", +"r c #BEBED0D0EEEE", +"t c #C4C4D5D5F0F0", +"y c #CBCBD9D9F1F1", +"u c #CCCCDADAF2F2", +"i c #D2D2DFDFF4F4", +"p c #D9D9E4E4F5F5", +"a c #DCDCE6E6F6F6", +"s c #DFDFE8E8F7F7", +"d c #E2E2EAEAF8F8", +"f c #EAEAF0F0FAFA", +"g c #EDEDF2F2FBFB", +"h c #F0F0F5F5FCFC", +"j c #F5F5F8F8FDFD", +"k c #F7F7F9F9FDFD", +"l c #FAFAFCFCFEFE", +"z c #FDFDFEFEFFFF", +"x c gray100", +"c c None", +/* pixels */ +"ccc%%%%%%%o-cccc", +"ccc%urw073%4-ccc", +"ccc%iurw07%k4>cc", +"cc9$$$<0w0%kk4$c", +"c1 @2,O <w%%%%$c", +"6 o8yg8+ 4e074%c", +"#++..a9+o&te07%c", +" ++o4x*++Xute0%c", +" ++.x;+++ pute%c", +" ++o *++o=sput%c", +"1.+ x9++ qfdpu%c", +"c: o oo 5jhfdp%c", +"cc6$$$:ylkjhfd%c", +"ccc%xxxzzlkjhf%c", +"ccc%%%%%%%%%%%%c" +}; diff --git a/assdraw/src/xpm/l__xpm.xpm b/assdraw/src/xpm/l__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..84d6a779a0a0cf24402148b17a33898e00c9b8a7 --- /dev/null +++ b/assdraw/src/xpm/l__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *l__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXX", +"XXXXX XXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/m__xpm.xpm b/assdraw/src/xpm/m__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..2f5fd393f4dd64333a030f00990b69004a5a7491 --- /dev/null +++ b/assdraw/src/xpm/m__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *m__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XXXXX XXX XX", +"XXXXX XXX XX", +"XXXXX X XX", +"XXXXX X XX", +"XXXXX X X X XX", +"XXXXX X X X XX", +"XXXXX X X XX", +"XXXXX X X XX", +"XXXXX XX XX XX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/n__xpm.xpm b/assdraw/src/xpm/n__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..e89a4fea90595e231fff5f0ff9dfc02871b3f549 --- /dev/null +++ b/assdraw/src/xpm/n__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *n__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XX XXXX XXX", +"XXXXX XXX XXX", +"XXXXX XX XXX", +"XXXXX XX XXX", +"XXXXX X X XXX", +"XXXXX X X XXX", +"XXXXX XX XXX", +"XXXXX XX XXX", +"XXXXX XXX XXX", +"XXXXX XXXX XXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/new__xpm.xpm b/assdraw/src/xpm/new__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..1327504d9180697903d556b6f1165a1d709ae181 --- /dev/null +++ b/assdraw/src/xpm/new__xpm.xpm @@ -0,0 +1,85 @@ +/* XPM */ +const char *new__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 64 1", +" c black", +". c gray10", +"X c #373737373737", +"o c #434343434343", +"O c #464646464646", +"+ c #484848484848", +"@ c #525251515050", +"# c #565656565656", +"$ c #595958585353", +"% c #5F5F5F5F5F5F", +"& c #606060606060", +"* c gray38", +"= c #676767676767", +"- c DimGray", +"; c #6A6A6A6A6A6A", +": c #6E6E6D6D6A6A", +"> c gray43", +", c #6F6F6F6F6F6F", +"< c gray44", +"1 c #767676767676", +"2 c #797979797979", +"3 c #7C7C7C7C7C7C", +"4 c #7F7F7F7F7F7F", +"5 c #818181818181", +"6 c #8D8D8D8D8D8D", +"7 c #8E8E8E8E8E8E", +"8 c #939393939393", +"9 c gray58", +"0 c #959595959595", +"q c gray59", +"w c gray60", +"e c #9A9A9A9A9A9A", +"r c #A4A4A1A19696", +"t c #A8A8A6A69C9C", +"y c #A7A7A7A7A7A7", +"u c gray66", +"i c #B1B1AFAFA5A5", +"p c #B3B3B1B1A8A8", +"a c #BDBDBBBBAFAF", +"s c gray70", +"d c #CDCDCACABCBC", +"f c #C8C8C8C8C8C8", +"g c #CACACACACACA", +"h c #CDCDCDCDCDCD", +"j c gray81", +"k c gray83", +"l c #D5D5D5D5D5D5", +"z c #D7D7D7D7D7D7", +"x c #D8D8D8D8D8D8", +"c c gray86", +"v c #DFDFDFDFDFDF", +"b c #E7E7E4E4D3D3", +"n c #E4E4E4E4E4E4", +"m c #E7E7E7E7E7E7", +"M c gray91", +"N c gray92", +"B c #EEEEEEEEEEEE", +"V c #EFEFEFEFEFEF", +"C c #F1F1F1F1F1F1", +"Z c gray95", +"A c #F3F3F3F3F3F3", +"S c #F6F6F6F6F6F6", +"D c gray100", +"F c None", +/* pixels */ +"FFFFFFFFFFFFFFFF", +"FFFFFFFFFFFFFFFF", +"FFFFFFFa@-------", +"FFFFFFaOZBnzhf,;", +"FFFFFaOZCmcjf<0$", +"FFFFaOZANvkf<y=t", +"FFFaOZABnzg<e3:d", +"FFaOZACmch#ewXiF", +"Fa>9755>%+2q.rFF", +"b;sxxxklf*6.rFFF", +"p8SSSSSSu4.rFFFF", +"1MDDDDDV&.rFFFFF", +"ooooooo+ rFFFFFF", +"FFFFFFFFFFFFFFFF", +"FFFFFFFFFFFFFFFF" +}; diff --git a/assdraw/src/xpm/nut__xpm.xpm b/assdraw/src/xpm/nut__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..83f93a2c66ec80101b9a0421621a90a834ace012 --- /dev/null +++ b/assdraw/src/xpm/nut__xpm.xpm @@ -0,0 +1,76 @@ +/* XPM */ +const char *nut__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 55 1", +" c #7F7F00000000", +". c #000013137F7F", +"X c #030315157F7F", +"o c #6C6C41416060", +"O c #808007070707", +"+ c #808009090909", +"@ c #838313131313", +"# c #848412121212", +"$ c #868618181818", +"% c #88881D1D1D1D", +"& c #88881E1E1E1E", +"* c #8A8A24242424", +"= c #8E8E30303030", +"- c #92923C3C3C3C", +"; c #949442424242", +": c #969648484848", +"> c #98984E4E4E4E", +", c #9A9A54545454", +"< c #9D9D5A5A5A5A", +"1 c #A1A165656565", +"2 c #A3A36B6B6B6B", +"3 c #A5A56F6F6F6F", +"4 c #A5A571717171", +"5 c #A7A777777777", +"6 c #A9A97D7D7D7D", +"7 c #0A0A1C1C8181", +"8 c #0C0C1C1C8080", +"9 c #0D0D1F1F8282", +"0 c #151525258484", +"q c #151525258585", +"w c #171728288686", +"e c #1F1F2F2F8888", +"r c #242432328A8A", +"t c #2A2A38388C8C", +"y c #2D2D3B3B8D8D", +"u c #61616A6A9F9F", +"i c #64646C6CA0A0", +"p c #74747C7CA6A6", +"a c #77777E7EA7A7", +"s c #AFAF8F8F8F8F", +"d c #B3B39B9B9B9B", +"f c #83838989ABAB", +"g c #89898E8EADAD", +"h c #8D8D9292AEAE", +"j c #8F8F9494AFAF", +"k c #9B9B9F9FB3B3", +"l c #B5B5A1A1A1A1", +"z c #B7B7A7A7A7A7", +"x c #B9B9ADADADAD", +"c c #A7A7A9A9B7B7", +"v c #BBBBB3B3B3B3", +"b c #B3B3B4B4BBBB", +"n c #BDBDB9B9B9B9", +"m c #B9B9BABABDBD", +"M c None", +/* pixels */ +"# @nMMMM", +" MMMMebMMM:5MMMM", +" MMMc9.MMMs=MMMM", +" ......pMMM#xMMM", +" h........0<1MMM", +" Mc......tkd*MMM", +" MMuX....bMM&lMM", +" MMy.....jMM1<MM", +" MM......rMMx#MM", +"+>d7.MM...fMM=sM", +"z4*$,dMMa.wmM5:M", +"MMMz2*$,dgqiMv#n", +"MMMMMMz2*$o8MM;6", +"MMMMMMMMMz2*$,3-", +"MMMMMMMMMMMMz2%O" +}; diff --git a/assdraw/src/xpm/p__xpm.xpm b/assdraw/src/xpm/p__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..4b22e4a8faa7cbe4aff703c482835d703818a440 --- /dev/null +++ b/assdraw/src/xpm/p__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *p__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XX XXXXX", +"XXXXX XXXX", +"XXXXX XXX XXXX", +"XXXXX XXX XXXX", +"XXXXX XXXX", +"XXXXX XXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXXXXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/pan_bg_xpm.xpm b/assdraw/src/xpm/pan_bg_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..69f5ae000ee47f446892feee4adf24e7404778e0 --- /dev/null +++ b/assdraw/src/xpm/pan_bg_xpm.xpm @@ -0,0 +1,87 @@ +/* XPM */ +const char *pan_bg_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 15 66 1", +" c #2A2A35354D4D", +". c #2C2C38384B4B", +"X c #36364A4A6464", +"o c #474757576E6E", +"O c #4D4D5C5C7272", +"+ c #5E5E66667171", +"@ c #606060606060", +"# c #C1C14B4B2B2B", +"$ c #CFCF55553636", +"% c #CBCB75752424", +"& c #BABA6D6D6666", +"* c #CCCC69695656", +"= c #C9C973736666", +"- c #FFFF7F7F7F7F", +"; c #EDEDA0A04C4C", +": c #EFEFA5A54F4F", +"> c #585866668585", +", c #646475759696", +"< c #7D7D89899E9E", +"1 c #72728383A7A7", +"2 c #80808A8A9D9D", +"3 c #86868E8E9D9D", +"4 c #89899999AFAF", +"5 c #8A8A9A9AAEAE", +"6 c #81819292BABA", +"7 c #9696A3A3B4B4", +"8 c #9D9DA7A7BBBB", +"9 c #A3A3ABABBABA", +"0 c #D3D396968D8D", +"q c #D2D297978D8D", +"w c #DDDDA5A59B9B", +"e c #E8E8C3C39393", +"r c #83839999C7C7", +"t c #9090A5A5C3C3", +"y c #9191A5A5C3C3", +"u c #9191A5A5C4C4", +"i c #9292A6A6C5C5", +"p c #9292A7A7C5C5", +"a c #9191A5A5C6C6", +"s c #9393A7A7C6C6", +"d c #9393A7A7C7C7", +"f c #9898A8A8C5C5", +"g c #9898AAAAC5C5", +"h c #9797A7A7C9C9", +"j c #9595A8A8CFCF", +"k c #9B9BB1B1DFDF", +"l c #AAAAB4B4C7C7", +"z c #D4D4C3C3D0D0", +"x c #CDCDDADAE9E9", +"c c #D2D2D8D8E2E2", +"v c #D6D6DCDCE6E6", +"b c #C8C8DADAFDFD", +"n c #D2D2DDDDF0F0", +"m c #D5D5DFDFF1F1", +"M c #E1E1E5E5ECEC", +"N c #F2F2E2E2E2E2", +"B c #F5F5E5E5E2E2", +"V c #F1F1E9E9ECEC", +"C c #EBEBEFEFFBFB", +"Z c #EFEFF5F5F9F9", +"A c #F1F1F4F4FAFA", +"S c #F2F2F5F5FCFC", +"D c #FAFAFBFBFEFE", +"F c #FDFDFEFEFEFE", +"G c gray100", +"H c None", +/* pixels */ +"HHHHH@HHHHHHHHHHHHHHHHHH", +"HHHHH@HHHHHHHHHHHHHHHHHH", +"HHHHH@HHHHHHHHHHHHHHHHHH", +"HHHHH@HHHHHHassdssyyygHH", +"H@@@@@@@@@HHsGFGABw0VXHH", +"H@HHH@---@HHiGGAAqe:&XHH", +"H@HHH@---@HHsGGZZ=;%#XHH", +"H@HHH@---@HHpGGvxN*$zXHH", +"H@HHH@---@HHiGc4<f98bXHH", +"H@@@@@@@@@HHuM5Sno23 XHH", +"H@HHHHHHH@HHu7DmkhOl+XHH", +"H@HHHHHHH@HHtCjr61,>.XHH", +"H@HHHHHHH@HHyXXXXXXXXXHH", +"H@HHHHHHH@HHHHHHHHHHHHHH", +"H@@@@@@@@@HHHHHHHHHHHHHH" +}; diff --git a/assdraw/src/xpm/pan_both_xpm.xpm b/assdraw/src/xpm/pan_both_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..3c41b2280e63d65ee4ad43004c9443ab892914d4 --- /dev/null +++ b/assdraw/src/xpm/pan_both_xpm.xpm @@ -0,0 +1,97 @@ +/* XPM */ +const char *pan_both_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 15 76 1", +" c #1B1B22225353", +". c #0D0D0D0D6767", +"X c #0F0F14146161", +"o c #111115156464", +"O c #121219196262", +"+ c #131313136969", +"@ c #131314146C6C", +"# c #111115156F6F", +"$ c #19191A1A6E6E", +"% c #1E1E1E1E6F6F", +"& c #1D1D21217878", +"* c #232330306262", +"= c #282837376262", +"- c #2A2A2A2A7575", +"; c #3C3C3C3C7E7E", +": c #36364A4A6464", +"> c #606060606060", +", c #C1C14B4B2B2B", +"< c #CFCF55553636", +"1 c #CBCB75752424", +"2 c #BABA6D6D6666", +"3 c #CCCC69695656", +"4 c #C9C973736666", +"5 c #FFFF7F7F7F7F", +"6 c #EDEDA0A04C4C", +"7 c #EFEFA5A54F4F", +"8 c #484848488484", +"9 c #5A5A5A5A8E8E", +"0 c #45454B4B9696", +"q c #5F5F5F5F9090", +"w c #656565659292", +"e c #777777779B9B", +"r c #7E7E7E7E9F9F", +"t c #B2B20000FFFF", +"y c #7D7D89899E9E", +"u c #7B7B8888B1B1", +"i c #83838383A1A1", +"p c #89899999AFAF", +"a c #8A8A9A9AAEAE", +"s c #9B9B9B9BADAD", +"d c #9696A3A3B4B4", +"f c #A1A1A1A1B0B0", +"g c #A7A7A7A7B3B3", +"h c #B9B9B9B9BCBC", +"j c #D3D396968D8D", +"k c #D2D297978D8D", +"l c #DDDDA5A59B9B", +"z c #E8E8C3C39393", +"x c #9090A5A5C3C3", +"c c #9191A5A5C3C3", +"v c #9191A5A5C4C4", +"b c #9292A6A6C5C5", +"n c #9292A7A7C5C5", +"m c #9191A5A5C6C6", +"M c #9393A7A7C6C6", +"N c #9393A7A7C7C7", +"B c #9898AAAAC5C5", +"V c #9595A8A8CFCF", +"C c #AAAAB3B3D4D4", +"Z c #D4D4C3C3D0D0", +"A c #C0C0CACAE3E3", +"S c #CDCDDADAE9E9", +"D c #D2D2D8D8E2E2", +"F c #D6D6DCDCE6E6", +"G c #E1E1E5E5ECEC", +"H c #F2F2E2E2E2E2", +"J c #F5F5E5E5E2E2", +"K c #F1F1E9E9ECEC", +"L c #EBEBEFEFFBFB", +"P c #EFEFF5F5F9F9", +"I c #F1F1F4F4FAFA", +"U c #F2F2F5F5FCFC", +"Y c #FAFAFBFBFEFE", +"T c #FDFDFEFEFEFE", +"R c gray100", +"E c None", +/* pixels */ +"EEEEE>EEEEEmMMNMMcccBEEE", +"EEEEE>EEEEEMRTRIJljK:EEE", +"EEEEE>EEEEEbRRIIkz72:EEE", +"EEEEE>EEEEEMRRPP461,:EEE", +"E>>>>>>>>>EnRRFSH3<Z:EEE", +"E>EEE>555>EbRDpyu$@0*EEE", +"E>EEE>555>EvGaUCott O%sE", +"E>EEE>555>EvdYA&tttttt-f", +"E>EEE>555>ExLV#tttttttt+", +"E>>>>>>>>>Ec::=Xttttttw9", +"E>EEEEEEE>EEEEEe8ttttt-h", +"E>EEEEEEE>EEEEEE9wttt-sE", +"E>EEEEEEE>EEEEEEE;itqqEE", +"E>EEEEEEE>EEEEEEEh-r-hEE", +"E>>>>>>>>>EEEEEEEEg.fEEE" +}; diff --git a/assdraw/src/xpm/pan_shape_xpm.xpm b/assdraw/src/xpm/pan_shape_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..40736fb33170d5d310858b550560a0e5b383ebf2 --- /dev/null +++ b/assdraw/src/xpm/pan_shape_xpm.xpm @@ -0,0 +1,63 @@ +/* XPM */ +const char *pan_shape_xpm[] = { +/* columns rows colors chars-per-pixel */ +"30 15 42 1", +" c black", +". c #010101010101", +"X c #070707070707", +"o c #0C0C0C0C0C0C", +"O c #484848484848", +"+ c #FFFF00006E6E", +"@ c #121223238585", +"# c #141424248585", +"$ c #181829298787", +"% c #1D1D2E2E8989", +"& c #1E1E2E2E8989", +"* c #2A2A39398D8D", +"= c #30303E3E8F8F", +"- c #363644449191", +"; c #3A3A48489292", +": c #3C3C49499393", +"> c #42424E4E9595", +", c #484854549797", +"< c #4E4E59599999", +"1 c #5A5A64649D9D", +"2 c #66666F6FA2A2", +"3 c #78787F7FA8A8", +"4 c #39395050D3D3", +"5 c #3C3C5252D4D4", +"6 c #3F3F5555D5D5", +"7 c #42425858D6D6", +"8 c #45455A5AD7D7", +"9 c #47475C5CD7D7", +"0 c #4B4B6060D9D9", +"q c #54546868DCDC", +"w c #5A5A6D6DDEDE", +"e c #5D5D7070DFDF", +"r c #60607373E0E0", +"t c #84848A8AACAC", +"y c #8A8A8F8FAEAE", +"u c #90909595B0B0", +"i c #A2A2A5A5B6B6", +"p c #A8A8AAAAB8B8", +"a c #AEAEB0B0BABA", +"s c #B4B4B5B5BCBC", +"d c #BABABBBBBEBE", +"f c None", +/* pixels */ +"ffffOfffffffffffffffffffffffff", +"ffff fffffffffffffffffffffffff", +"ffff fffffffffffffffu%3fffffff", +"ffff fffffffffffffi:=9,$3fffff", +"X .fffffffa<&7rrrq,$3fff", +" fff +++ fffffd2&4rrrrrrrq,$3f", +" fff +++ fffft&1wrrrrrrrrrrq,=", +" fff +++ fff#;qrrrrrrrrrrrrr5,", +" fff +++ fff>6rrrrrrrrrrrq1@,p", +" fffy-rrrrrrrrr8:$2aff", +" fffffff fffd@wrrrrre4&-tfffff", +" fffffff ffff,5rrrq1@<ifffffff", +" fffffff ffffy-r0:$2sfffffffff", +" fffffff ffffd&=*tffffffffffff", +"o offfffffffffffffffffff" +}; diff --git a/assdraw/src/xpm/pan_shp_xpm.xpm b/assdraw/src/xpm/pan_shp_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..33df477c8a80a9d27bbf71a55582a3f502feb359 --- /dev/null +++ b/assdraw/src/xpm/pan_shp_xpm.xpm @@ -0,0 +1,57 @@ +/* XPM */ +const char *pan_shp_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 15 36 1", +" c #0D0D0D0D6767", +". c #131313136969", +"X c #181818186C6C", +"o c #1A1A1A1A6E6E", +"O c #1E1E1E1E6F6F", +"+ c #242424247272", +"@ c #2A2A2A2A7575", +"# c #303030307878", +"$ c #363636367B7B", +"% c #3C3C3C3C7E7E", +"& c #606060606060", +"* c #FFFF7F7F7F7F", +"= c #424242428181", +"- c #484848488484", +"; c #5A5A5A5A8E8E", +": c #5F5F5F5F9090", +"> c #656565659292", +", c #777777779B9B", +"< c #7D7D7D7D9E9E", +"1 c #7E7E7E7E9F9F", +"2 c #A1A14949D3D3", +"3 c #A6A64D4DD6D6", +"4 c #A9A95050D7D7", +"5 c #AAAA5151D8D8", +"6 c #ACAC5353D9D9", +"7 c #AFAF5656DADA", +"8 c #B5B55C5CDDDD", +"9 c #B8B85F5FDFDF", +"0 c #83838383A1A1", +"q c #8F8F8F8FA7A7", +"w c #9B9B9B9BADAD", +"e c #A1A1A1A1B0B0", +"r c #A7A7A7A7B3B3", +"t c #ADADADADB6B6", +"y c #B9B9B9B9BCBC", +"u c None", +/* pixels */ +"uuuuu&uuuuuuuuuuuuuuuuuu", +"uuuuu&uuuuuuuuuuuuuuuuuu", +"uuuuu&uuuuuuuuuuuuuuuuuu", +"uuuuu&uuuuuuuuwOX=<uuuuu", +"u&&&&&&&&&uuuw#46<=Owuuu", +"u&uuu&***&uut+799994@euu", +"u&uuu&***&uuo29999995.uu", +"u&uuu&***&uuq$899999>;uu", +"u&uuu&***&uuu,-99993@yuu", +"u&&&&&&&&&uuuu;>998@wuuu", +"u&uuuuuuu&uuuuu%09::uuuu", +"u&uuuuuuu&uuuuuy@1@yuuuu", +"u&uuuuuuu&uuuuuur euuuuu", +"u&uuuuuuu&uuuuuuuuuuuuuu", +"u&&&&&&&&&uuuuuuuuuuuuuu" +}; diff --git a/assdraw/src/xpm/preview__xpm.xpm b/assdraw/src/xpm/preview__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..330bf694951c26c9be398c71ecf5a024dbf1e700 --- /dev/null +++ b/assdraw/src/xpm/preview__xpm.xpm @@ -0,0 +1,100 @@ +/* XPM */ +const char *preview__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 79 1", +" c gray20", +". c #353535353535", +"X c gray21", +"o c gray22", +"O c gray23", +"+ c #3C3C3C3C3C3C", +"@ c #3E3E3E3E3E3E", +"# c #3F3F3F3F3F3F", +"$ c gray25", +"% c #414141414141", +"& c gray26", +"* c #434343434343", +"= c gray27", +"- c #464646464646", +"; c #484848484848", +": c #494949494949", +"> c gray29", +", c #4B4B4B4B4B4B", +"< c #4C4C4C4C4C4C", +"1 c gray30", +"2 c #505050505050", +"3 c gray32", +"4 c gray33", +"5 c #555555555555", +"6 c #565656565656", +"7 c gray34", +"8 c gray35", +"9 c #5A5A5A5A5A5A", +"0 c #5B5B5B5B5B5B", +"q c #5D5D5D5D5D5D", +"w c #676767676767", +"e c #6D6D6D6D6D6D", +"r c gray43", +"t c #6F6F6F6F6F6F", +"y c gray44", +"u c #727272727272", +"i c gray46", +"p c #777777777777", +"a c gray47", +"s c #7B7B7B7B7B7B", +"d c gray49", +"f c #7E7E7E7E7E7E", +"g c #808080808080", +"h c #848484848484", +"j c #898989898989", +"k c gray54", +"l c #8B8B8B8B8B8B", +"z c gray55", +"x c #8D8D8D8D8D8D", +"c c #909090909090", +"v c gray57", +"b c gray58", +"n c gray59", +"m c #979797979797", +"M c #9A9A9A9A9A9A", +"N c #9B9B9B9B9B9B", +"B c #9D9D9D9D9D9D", +"V c #9F9F9F9F9F9F", +"C c #A0A0A0A0A0A0", +"Z c gray63", +"A c gray64", +"S c #A4A4A4A4A4A4", +"D c #A5A5A5A5A5A5", +"F c gray65", +"G c #A7A7A7A7A7A7", +"H c #A9A9A9A9A9A9", +"J c gray67", +"K c #ACACACACACAC", +"L c gray68", +"P c #AEAEAEAEAEAE", +"I c #B4B4B4B4B4B4", +"U c gray71", +"Y c #B9B9B9B9B9B9", +"T c gray73", +"R c #BBBBBBBBBBBB", +"E c gray74", +"W c gray", +"Q c gray75", +"! c None", +/* pixels */ +"!!!!!!!!d.6Q!!!!", +"!!!!!!!coI4j!!!!", +"!!!r,51%P!zq!E!!", +"!!B*DCAW!!F@a$&S", +"!!V:!!!!!!QguJk6", +"!!!-m!!!!!!!!!k0", +"!!!st!!!!!!!!sXG", +"!!Y+n!!!!!!l*5K!", +"!R=f!!!!!!x#N!!!", +"!5t!!!!!!!wp!!!!", +"N+!!!!!!!!HoM!!!", +"8l!!!y5t!!!ZO!!!", +"3n!!99G2h!!b<!!!", +"vOAe>!!L RU.B!!!", +"!h>7T!!!i;=f!!!!" +}; diff --git a/assdraw/src/xpm/res.cpp b/assdraw/src/xpm/res.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0f0a787a07479c0338a7d6f966c1b74216f1c470 --- /dev/null +++ b/assdraw/src/xpm/res.cpp @@ -0,0 +1,30 @@ +#define static +#include "appico_xpm.xpm" +#include "add__xpm.xpm" +#include "arr_1_xpm.xpm" +#include "arr__xpm.xpm" +#include "assdraw3_xpm.xpm" +#include "b__xpm.xpm" +#include "c__xpm.xpm" +#include "check__xpm.xpm" +#include "del__xpm.xpm" +#include "del_cross_xpm.xpm" +#include "help__xpm.xpm" +#include "help_xpm.xpm" +#include "l__xpm.xpm" +#include "m__xpm.xpm" +#include "n__xpm.xpm" +#include "new__xpm.xpm" +#include "nut__xpm.xpm" +#include "p__xpm.xpm" +#include "pan_bg_xpm.xpm" +#include "pan_both_xpm.xpm" +#include "pan_shape_xpm.xpm" +#include "pan_shp_xpm.xpm" +#include "preview__xpm.xpm" +#include "rot__xpm.xpm" +#include "s__xpm.xpm" +#include "sc_rot__xpm.xpm" +#include "src__xpm.xpm" +#include "transform_xpm.xpm" +#include "uncheck__xpm.xpm" diff --git a/assdraw/src/xpm/res.h b/assdraw/src/xpm/res.h new file mode 100644 index 0000000000000000000000000000000000000000..58753b313e58c157517475d74638bd9c620641e2 --- /dev/null +++ b/assdraw/src/xpm/res.h @@ -0,0 +1,29 @@ +extern char *appico_xpm[]; +extern char *add_xpm[]; +extern char *arr___xpm[]; +extern char *arr__xpm[]; +extern char *assdraw3__xpm[]; +extern char *b__xpm[]; +extern char *c__xpm[]; +extern char *check_xpm[]; +extern char *del__xpm[]; +extern char *delcross_xpm[]; +extern char *help__xpm[]; +extern char *help_xpm[]; +extern char *l__xpm[]; +extern char *m__xpm[]; +extern char *n__xpm[]; +extern char *new__xpm[]; +extern char *nut__xpm[]; +extern char *p__xpm[]; +extern char *pan_bg_xpm[]; +extern char *pan_both_xpm[]; +extern char *pan_shape_xpm[]; +extern char *pan_shp_xpm[]; +extern char *preview__xpm[]; +extern char *rot__xpm[]; +extern char *s__xpm[]; +extern char *sc_rot__xpm[]; +extern char *src__xpm[]; +extern char *transform_xpm[]; +extern char *uncheck_xpm[]; diff --git a/assdraw/src/xpm/rot__xpm.xpm b/assdraw/src/xpm/rot__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..8652305231861d6fb999d615080ad17d84cbaf65 --- /dev/null +++ b/assdraw/src/xpm/rot__xpm.xpm @@ -0,0 +1,102 @@ +/* XPM */ +const char *rot__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 81 1", +" c #62625858C4C4", +". c #62625959C4C4", +"X c #64645A5AC4C4", +"o c #65655B5BC4C4", +"O c #65655B5BC5C5", +"+ c #66665C5CC4C4", +"@ c #66665D5DC5C5", +"# c #67675D5DC5C5", +"$ c #67675E5EC5C5", +"% c #68685E5EC5C5", +"& c #69695F5FC5C5", +"* c #69696060C6C6", +"= c #6A6A6161C6C6", +"- c #6E6E6565C7C7", +"; c #6F6F6767C7C7", +": c #73736A6AC7C7", +"> c #77776E6EC7C7", +", c #73736A6AC8C8", +"< c #73736B6BC8C8", +"1 c #74746B6BC8C8", +"2 c #76766D6DC8C8", +"3 c #7D7D7474C9C9", +"4 c #7E7E7575C9C9", +"5 c #7E7E7676C9C9", +"6 c #7E7E7676CBCB", +"7 c #7F7F7676CBCB", +"8 c #80807777CACA", +"9 c #81817878CBCB", +"0 c #81817979CDCD", +"q c #82827A7ACCCC", +"w c #87877F7FCCCC", +"e c #88887F7FCCCC", +"r c #88888080CDCD", +"t c #8E8E8686CDCD", +"y c #91918989CFCF", +"u c #93938A8ACECE", +"i c #92928A8ACFCF", +"p c #96968E8ECECE", +"a c #92928B8BD0D0", +"s c #A1A19999D0D0", +"d c #A3A39B9BD3D3", +"f c #A4A49D9DD3D3", +"g c #A5A59E9ED2D2", +"h c #A7A79F9FD3D3", +"j c #A3A39D9DD4D4", +"k c #A4A49D9DD4D4", +"l c #A6A69E9ED5D5", +"z c #A7A7A0A0D4D4", +"x c #ABABA4A4D2D2", +"c c #A8A8A1A1D5D5", +"v c #A9A9A2A2D4D4", +"b c #AAAAA3A3D7D7", +"n c #A7A7A0A0D8D8", +"m c #B1B1ABABD5D5", +"M c #B7B7B0B0D7D7", +"N c #BABAB3B3D7D7", +"B c #BBBBB5B5D5D5", +"V c #BFBFB9B9D6D6", +"C c #BFBFBABAD9D9", +"Z c #C3C3BDBDDADA", +"A c #C2C2BDBDDEDE", +"S c #C4C4BFBFDCDC", +"D c #C5C5C0C0DCDC", +"F c #C7C7C2C2DEDE", +"G c #C8C8C2C2DADA", +"H c #CACAC5C5D8D8", +"J c #C9C9C4C4DADA", +"K c #CBCBC6C6DBDB", +"L c #CCCCC7C7DFDF", +"P c #D1D1CCCCDCDC", +"I c #D4D4CFCFDEDE", +"U c #D6D6D1D1DDDD", +"Y c #D0D0CACAE1E1", +"T c #D2D2CCCCE1E1", +"R c #D4D4CFCFE0E0", +"E c #D3D3CECEE4E4", +"W c #D6D6D1D1E1E1", +"Q c #D8D8D3D3E1E1", +"! c #D8D8D2D2E3E3", +"~ c #DBDBD7D7E5E5", +"^ c None", +/* pixels */ +"^^^^^^^^^^^^^^^^", +"^^En0&+^^^^^^^^^", +"^A9O ~^^^^^^^^", +"TqO7bY^^^^^^!^^^", +"c*6L^^^^^^^WkF^^", +"rOl^^^^^^^Wj<aF^", +"1 S^^^^^^Rd,$=iD", +"1 Q^^^^^^z;@@@$y", +"1 Z^^^^^^^I1Xv^^", +"wOf^^^^^^^M-2C^^", +"g&3G^^^^^Ut#u^^^", +"K8O3hJ^Pme#:N^^^", +"^B4O . :x^^^^", +"^^Hs5%oo>pV^^^^^", +"^^^^^^^^^^^^^^^^" +}; diff --git a/assdraw/src/xpm/s__xpm.xpm b/assdraw/src/xpm/s__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..4eac4e49df77930cba41cd2d09744aa0c4d880ff --- /dev/null +++ b/assdraw/src/xpm/s__xpm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +const char *s__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c gray20", +". c #12120000FFFF", +"X c None", +/* pixels */ +"XX.XXXXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +".....XXXXXXXXXXX", +"XX.XXXXXXXXXXXXX", +"XX.XXX XXXXX", +"XXXXX XXXX", +"XXXXX XXX XXXX", +"XXXXX XXXXXXXXX", +"XXXXX XXXXX", +"XXXXXX XXXX", +"XXXXXXXXXX XXXX", +"XXXXX XXX XXXX", +"XXXXX XXXX", +"XXXXXX XXXXX", +"XXXXXXXXXXXXXXXX" +}; diff --git a/assdraw/src/xpm/sc_rot__xpm.xpm b/assdraw/src/xpm/sc_rot__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..ea44fb665b012aa71e4cf087724642bfe83ba37e --- /dev/null +++ b/assdraw/src/xpm/sc_rot__xpm.xpm @@ -0,0 +1,140 @@ +/* XPM */ +const char *sc_rot__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 119 2", +" c #212126264747", +". c #2B2B2B2B4848", +"X c #363636364D4D", +"o c #3B3B3B3B5C5C", +"O c #141425256565", +"+ c #0B0B27277D7D", +"@ c #282828286262", +"# c #373737376060", +"$ c #363636366363", +"% c #323232327878", +"& c #3C3C4C4C5858", +"* c #35354F4F6161", +"= c #2F2F56567373", +"- c #303055557070", +"; c #404040405454", +": c #41414F4F5959", +"> c #505050505050", +", c #505050505959", +"< c #585858585858", +"1 c #434343437F7F", +"2 c #4B4B4B4B7979", +"3 c #6F6F6F6F7676", +"4 c #686868687D7D", +"5 c gray44", +"6 c gray47", +"7 c #7C7C7C7C7C7C", +"8 c #0B0B27279C9C", +"9 c #202020208C8C", +"0 c #16161C1CA0A0", +"q c #00003737A0A0", +"w c #00003737ACAC", +"e c #0B0B2727BBBB", +"r c #00003737B9B9", +"t c #22222222A2A2", +"y c #25252525A5A5", +"u c #28282828A8A8", +"i c #2F2F2F2FAFAF", +"p c #35353535A2A2", +"a c #37373737B7B7", +"s c #3B3B3B3BBBBB", +"d c #3E3E3E3EBEBE", +"f c #181843438585", +"g c #28285F5F8888", +"h c #1F1F67679E9E", +"j c #202062629595", +"k c #242465659494", +"l c #222267679A9A", +"z c #222268689A9A", +"x c #00004747B0B0", +"c c #00005050B9B9", +"v c #16167777BDBD", +"b c #20206A6AA0A0", +"n c #4B4B4B4B8686", +"m c #474747478888", +"M c #474747478D8D", +"N c #474747478F8F", +"B c #525252528D8D", +"V c #474747479393", +"C c #414141419595", +"Z c #474747479494", +"A c #474747479595", +"S c #474747479A9A", +"D c #474747479B9B", +"F c #474747479C9C", +"G c #5E5E5E5E9090", +"H c #5E5E5E5E9292", +"J c #696969698080", +"K c #606060608A8A", +"L c #6A6A6A6A9898", +"P c #797979799696", +"I c #757575759D9D", +"U c #767676769E9E", +"Y c #47474747A0A0", +"T c #47474747A1A1", +"R c #47474747A3A3", +"E c #44444444A5A5", +"W c #47474747A6A6", +"Q c #47474747A7A7", +"! c #47474747ACAC", +"~ c #47474747AEAE", +"^ c #47474747AFAF", +"/ c #47474747B4B4", +"( c #47474747B9B9", +") c #47474747BABA", +"_ c #00003737C5C5", +"` c #00003737CCCC", +"' c #00003737D2D2", +"] c #00003737D8D8", +"[ c #00003737DFDF", +"{ c #00005A5AC3C3", +"} c #00006C6CD6D6", +"| c #00007F7FE9E9", +" . c #47474747C0C0", +".. c #47474747C1C1", +"X. c #44444444C4C4", +"o. c #46464646C6C6", +"O. c #47474747C6C6", +"+. c #47474747C7C7", +"@. c #00009191FCFC", +"#. c #00009494FFFF", +"$. c #909090909090", +"%. c #80808080A2A2", +"&. c #82828282A3A3", +"*. c #8C8C8C8CA8A8", +"=. c #8F8F8F8FA9A9", +"-. c #98989898ADAD", +";. c #99999999AEAE", +":. c #A4A4A4A4A4A4", +">. c gray66", +",. c #ACACACACACAC", +"<. c #A3A3A3A3B2B2", +"1. c #A4A4A4A4B3B3", +"2. c #A7A7A7A7B4B4", +"3. c #B0B0B0B0B8B8", +"4. c #B1B1B1B1B9B9", +"5. c #BCBCBCBCBDBD", +"6. c #BCBCBCBCBEBE", +"7. c gray75", +"8. c None", +/* pixels */ +": * = g j b b : 7 >.8.8.8.8.8.8.", +"k v z - O c f 4 , > 6 >.8.8.8.", +"b #.#.@.q ] ` 8 D N n 2 o ; 3 ,.", +"b #.#.| w [ [ e +.+. ./ W C % . ", +"b #.#.} r [ [ e +.+.+.+.+.+.) G ", +"b #.#.{ _ [ [ e +.+.+.+.+.+.~ I ", +"b #.#.x ' [ [ e +.+.+.+.+.+.T *.", +"& l h + e e e 0 X.+.+.+.+.+.Z 1.", +"$.5 <.A +.+.+.d t o.+.+.+.O.m 6.", +"8.< P R +.+.+.+.a u +.+.+.( H 8.", +"8.:.# ^ +.+.+.+.+.i i +.+.! U 8.", +"8.8.$ p +.+.+.+.+.+.u a +.Y =.8.", +"8.5.J @ M S Q / ..+.o.y s V 2.8.", +"8.8.8.8.4.;.&.L B N F E 9 1 7.8.", +"8.8.8.8.8.8.8.8.8.3.-.%.K X 8.8." +}; diff --git a/assdraw/src/xpm/src__xpm.xpm b/assdraw/src/xpm/src__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..b53d5fe1f2cd1ff8e53dd407aeeefcaf270cc894 --- /dev/null +++ b/assdraw/src/xpm/src__xpm.xpm @@ -0,0 +1,25 @@ +/* XPM */ +const char *src__xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c black", +". c #0000BFBFBFBF", +"X c cyan", +"o c None", +/* pixels */ +"oooooo ooooooo", +"ooo oo . oo oooo", +"oo X o o X ooo", +"o X. XXX .. oo", +"oo XX..... ooo", +"ooo X. .. oooo", +" X. ooo .. o", +" X .. ooo X. . o", +" .. ooo X. o", +"ooo .. X. oooo", +"oo ...XX.. ooo", +"o X. ... .. oo", +"oo . o o . ooo", +"ooo oo . oo oooo", +"oooooo ooooooo" +}; diff --git a/assdraw/src/xpm/transform_xpm.xpm b/assdraw/src/xpm/transform_xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..9c2d7d9f7bab371e60ce0fb2036f801ba0eeff71 --- /dev/null +++ b/assdraw/src/xpm/transform_xpm.xpm @@ -0,0 +1,65 @@ +/* XPM */ +const char *transform_xpm[] = { +/* columns rows colors chars-per-pixel */ +"224 56 3 1", +" c black", +". c red", +"X c gray100", +/* pixels */ +"................................................................................................................................................................................................................................", +".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXX XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX XXXXX XX XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX.", +".XXXXX XXXX X XXXX XXXXXXXXXXXXXXX XXXXXX X XX XXXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX X XX XXXXXX XXXXXXXXX XXXXX XX XXXX XXXX X XXXXXXXXXXXXXX X XX XX X XXX XXXX XXXXXXXXXXXXX XXXXX X XX X XXXX XXXXX.", +".XXXXX XXXXX XXX XXXXX XXXXXXXXXXXXXXX XXXXX XX XX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXX XX XX XXXXX XXXXXXXX XXXXXX XX XXXX XXXXX XXX XXXXXXXXXXXXXX XX XX XX XXX XXXX XXXX XXXXXXXXXXXXX XXXX XX XX XXX XXXXX XXXXX.", +".XXXXX XXXXXX X XXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXXX XXXXXXX XXXXXXX XX XXXX XXXXXX X XXXX XXX XXX XXX XXX X XXXXX XXXX XXXXXXXXXXXXX XXXXX XXX XXX X XXXXXX XXXXX.", +".XXXXX XXXXXXX XXXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXXX XXXXXX XXXXXXXX XX XXXX XXXXXXX XXXXXXXXXXXXXXXXX XXX XXX XXXX XXXXXX XXXX XXXXXXXXXXXXX XXXXX XXX XXXX XXXXXXX XXXXX.", +".XXXXX XXXXXX X XXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXXX XXXXX XXXXXXXXX XX XXXX XXXXXX X XXXXXXXXXXXXXXXX XXX XXX XXX X XXXXX XXXX XXXXXXXXXXXXX XXXXX XXX XXX X XXXXXX XXXXX.", +".XXXXX XXXXX XXX XXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXXX XXXX XXXX XXXXX XX XXXXXXXXXX XXX XXXXXXXXXXXXXXX XXX XXX XX XXX XXXXXXXXX XXXXXXXXXXXXX XXXXX XXX XX XXX XXXXX XXXXX.", +".XXXXX XXXX X XXXX XXXXXXXXXXXXXXX XXXXX X X XXX XXXXX XXXXXXXXXXXXXXXXX X X XXX XXX XXXXX XX XXXXX XXX X XXXXXXXXXXXXX X X X XX XXXXX XXXXXXXXXXXXX XXXX X X XXXX XXXXX.", +".XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXX XXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX.", +".XXXXX XXXXXXXXXXXXXXX XXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX.", +".XXXXX XXXXXXXXXXXXXXX XXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXX XXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX.", +".XXXXX XXXXXXXXXXXXX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XX.", +".XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX XXXXX XX XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXX.", +".XXXXX XXXX X XXXX XXXXXXXXXXXXXXX XXXXXX X XX XXXXXXXX XXXXX XXXXXXXXXXXXXXXXXXX X XX XXXXXXXX XXXXXXX XXXXX XX XXXX XXXX X XXXXXXXXXXXXXX X XX XX X XXX XXXX XXXXXXXXXXXXX XXXXX X XX X XXXX XXXXX.", +".XXXXX XXXXX XXX XXXXX XXXXXXXXXXXXXXX XXXXX XX XX XXXXXX XXXXXX XXXXXXXXXXXXXXXXXX XX XX XXXXXX XXXXXXX XXXXXX XX XXXX XXXXX XXX XXXXXXXXXXXXXX XX XX XX XXX XXXX XXXX XXXXXXXXXXXXX XXXX XX XX XXX XXXXX XXXXX.", +".XXXXX XXXXX XXX XXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXXX XXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXXX XXXXXXX XXXXXXX XX XXXX XXXXX XXX XXX XXX XXX XXX XX XXX XXXX XXXX XXXXXXXXXXXXX XXXXX XXX XX XXX XXXXX XXXXX.", +".XXXXX XXXXXX X XXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXXX XXXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXXX XXXXXXX XXXXXXXX XX XXXX XXXXXX X XXXXXXXXXXXXXXXX XXX XXX XXX X XXXXX XXXX XXXXXXXXXXXXX XXXXX XXX XXX X XXXXXX XXXXX.", +".XXXXX XXXXXX X XXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XXX XXXXXXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XXX XXXXXXX XXXXXXXXX XX XXXX XXXXXX X XXXXXXXXXXXXXXXX XXX XXX XXX X XXXXX XXXX XXXXXXXXXXXXX XXXXX XXX XXX X XXXXXX XXXXX.", +".XXXXX XXXXXXX XXXXXX XXXXXXXXXXXXXXX XXXXXX XXX XXX XX XXXX XXXXX XXXXXXXXXXXXXXXXXXX XXX XXX XX XXXX XX XXXX XXXXX XX XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXX XXX XXXX XXXXXXXXXX XXXXXXXXXXXXX XXXXX XXX XXXX XXXXXX XXXXX.", +".XXXXX XXXXXXX XXXXXXX XXXXXXXXXXXXXXX XXXXX X X X XXXX XXXXXXXXXXXXXXXXX X X X XX XXXXX XX XXXXX XXXXXX XXXXXXXXXXXXXXXX X X XXX XXXXX XXXXX XXXXXXXXXXXXX XXXX X XXX XXXXXXX XXXXX.", +".XXXXX XXXXXXX XXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXX XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXX XXXXX.", +".XXXXX XXXXXX XXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXX.", +".XXXXX XXXX XXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XXXXXX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXX XXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", +".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", +".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", +"................................................................................................................................................................................................................................" +}; diff --git a/assdraw/src/xpm/uncheck__xpm.xpm b/assdraw/src/xpm/uncheck__xpm.xpm new file mode 100644 index 0000000000000000000000000000000000000000..d3be0ca5bd4ef211e8eef05b1df3a6033ac03030 --- /dev/null +++ b/assdraw/src/xpm/uncheck__xpm.xpm @@ -0,0 +1,26 @@ +/* XPM */ +const char *uncheck_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c gray25", +". c #808080808080", +"X c #D4D4D0D0C8C8", +"o c gray100", +"O c None", +/* pixels */ +"OOOOOOOOOOOOOOOO", +"OO............OO", +"OO. XOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO. oooooooooXOO", +"OO.XXXXXXXXXXXOO", +"OOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOO" +};