Merge branch 'master' into sdl2.0
Merging master 2019-september-24 into sdl2.0 branch
7
.gitignore
vendored
|
|
@ -1,8 +1,5 @@
|
|||
*~
|
||||
.DS_Store
|
||||
dummy.o
|
||||
*.dylib
|
||||
*.dylib.dSYM
|
||||
*.o
|
||||
obj/parse.c
|
||||
obj/parse_step1.c
|
||||
|
|
@ -13,3 +10,7 @@ trans/
|
|||
tuxpaint
|
||||
TuxPaint.app
|
||||
TuxPaint.dmg
|
||||
*.dylib
|
||||
*.dylib.dSYM
|
||||
.DS_Store
|
||||
*.thumbs
|
||||
|
|
|
|||
87
Makefile
|
|
@ -1,10 +1,10 @@
|
|||
# Tux Paint - A simple drawing program for children.
|
||||
|
||||
# Copyright (c) 2002-2018
|
||||
# Copyright (c) 2002-2019
|
||||
# Various contributors (see AUTHORS.txt)
|
||||
# http://www.tuxpaint.org/
|
||||
|
||||
# June 14, 2002 - December 18, 2018
|
||||
# June 14, 2002 - September 14, 2019
|
||||
|
||||
|
||||
# The version number, for release:
|
||||
|
|
@ -131,7 +131,6 @@ ARCH_HEADERS:=$($(OS)_ARCH_HEADERS)
|
|||
# For macOS, the prefix is relative to DESTDIR.
|
||||
windows_PREFIX:=/usr/local
|
||||
osx_PREFIX:=Resources
|
||||
beos_PREFIX=$(shell finddir B_APPS_DIRECTORY)/TuxPaint
|
||||
linux_PREFIX:=/usr/local
|
||||
PREFIX:=$($(OS)_PREFIX)
|
||||
|
||||
|
|
@ -277,6 +276,12 @@ DEBUG_FLAGS:=
|
|||
|
||||
MOUSE_CFLAGS:=-Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES
|
||||
|
||||
# On an average-sized screen (e.g., 800x600 window), the thumbnails
|
||||
# are 132x80. On larger screens, they will be bigger (since the New dialog
|
||||
# is always 4x4 thumbnails); therefore, generating larger thumbs, which can
|
||||
# be still be scaled down fairly quickly (esp. complicated SVG ones).
|
||||
CONVERT_OPTS:=-alpha Background -alpha Off +depth -resize !264x160 -background white -interlace none
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
#############################################################################
|
||||
|
|
@ -286,8 +291,7 @@ MOUSE_CFLAGS:=-Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES
|
|||
# "make" with no arguments builds the program and man page from sources:
|
||||
#
|
||||
.PHONY: all
|
||||
all: tuxpaint translations magic-plugins tp-magic-config
|
||||
# thumb-starters
|
||||
all: tuxpaint translations magic-plugins tp-magic-config thumb-starters thumb-templates
|
||||
@echo
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
|
|
@ -462,7 +466,6 @@ trans:
|
|||
|
||||
windows_ARCH_INSTALL:=
|
||||
osx_ARCH_INSTALL:=install-macbundle TuxPaint.dmg
|
||||
beos_ARCH_INSTALL:=install-haiku
|
||||
linux_ARCH_INSTALL:=install-kde install-kde-icons
|
||||
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
|
||||
|
||||
|
|
@ -476,14 +479,14 @@ install: install-bin install-data install-man install-doc \
|
|||
install-icon install-gettext install-im install-importscript \
|
||||
install-default-config install-example-stamps \
|
||||
install-example-starters install-example-templates \
|
||||
install-thumb-starters install-thumb-templates \
|
||||
install-bash-completion \
|
||||
install-osk \
|
||||
$(ARCH_INSTALL)
|
||||
#install-thumb-starters
|
||||
@echo
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo
|
||||
@if [ "x$(OS)" == "xosx" ]; then \
|
||||
@if [ "x$(OS)" = "xosx" ]; then \
|
||||
echo "All done! Now you can double click $(BUNDLE) to run the"; \
|
||||
echo "program!!! TuxPaint.dmg has also been created for"; \
|
||||
echo "distribution."; \
|
||||
|
|
@ -692,22 +695,25 @@ INSTALLED_THUMB_STARTERS:=$(patsubst %,$(DATA_PREFIX)/%,$(THUMB_STARTERS))
|
|||
|
||||
STARTER_NAME=$(or $(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=.svg))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=.png))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=.jpg))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=.jpeg))))
|
||||
|
||||
STARTER_BACK_NAME=$(or $(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=-back.svg))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=-back.png))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=-back.jpg))),\
|
||||
$(wildcard $(subst starters/.thumbs,starters,$(@:-t.png=-back.jpeg))))
|
||||
|
||||
# FIXME: Need to be able to update a thumbnail if the source image is modified -bjk 2019.09.14
|
||||
$(THUMB_STARTERS):
|
||||
@echo -n "."
|
||||
@mkdir -p starters/.thumbs
|
||||
@if [ "x" != "x"$(STARTER_BACK_NAME) ] ; \
|
||||
then \
|
||||
composite $(STARTER_NAME) $(STARTER_BACK_NAME) obj/tmp.png ; \
|
||||
convert -scale !132x80 -background white -alpha Background -alpha Off obj/tmp.png $@ ; \
|
||||
convert $(CONVERT_OPTS) obj/tmp.png $@ ; \
|
||||
rm obj/tmp.png ; \
|
||||
else \
|
||||
convert -scale !132x80 -background white -alpha Background -alpha Off $(STARTER_NAME) $@ ; \
|
||||
convert $(CONVERT_OPTS) $(STARTER_NAME) $@ ; \
|
||||
fi
|
||||
|
||||
$(INSTALLED_THUMB_STARTERS): $(DATA_PREFIX)/%: %
|
||||
|
|
@ -750,6 +756,41 @@ echo-install-example-templates:
|
|||
.PHONY: install-example-templates
|
||||
install-example-templates: echo-install-example-templates install-example-template-dirs $(INSTALLED_TEMPLATES)
|
||||
|
||||
THUMB_TEMPLATES:=$(sort $(patsubst templates%, templates/.thumbs%-t.png, $(basename $(subst -back.,.,$(TEMPLATES)))))
|
||||
INSTALLED_THUMB_TEMPLATES:=$(patsubst %,$(DATA_PREFIX)/%,$(THUMB_TEMPLATES))
|
||||
|
||||
TEMPLATE_NAME=$(or $(wildcard $(subst templates/.thumbs,templates,$(@:-t.png=.svg))),\
|
||||
$(wildcard $(subst templates/.thumbs,templates,$(@:-t.png=.png))),\
|
||||
$(wildcard $(subst templates/.thumbs,templates,$(@:-t.png=.jpg))),\
|
||||
$(wildcard $(subst templates/.thumbs,templates,$(@:-t.png=.jpeg))))
|
||||
|
||||
# FIXME: Need to be able to update a thumbnail if the source image is modified -bjk 2019.09.14
|
||||
$(THUMB_TEMPLATES):
|
||||
@echo -n "."
|
||||
@mkdir -p templates/.thumbs
|
||||
@convert $(CONVERT_OPTS) $(TEMPLATE_NAME) $@ ; \
|
||||
|
||||
$(INSTALLED_THUMB_TEMPLATES): $(DATA_PREFIX)/%: %
|
||||
@install -D -m 644 $< $@
|
||||
|
||||
.PHONY: echo-thumb-templates
|
||||
echo-thumb-templates:
|
||||
@echo
|
||||
@echo "...Generating thumbnails for templates..."
|
||||
|
||||
# Create thumbnails for templates
|
||||
.PHONY: thumb-templates
|
||||
thumb-templates: echo-thumb-templates $(THUMB_TEMPLATES)
|
||||
|
||||
.PHONY: echo-install-thumb-templates
|
||||
echo-install-thumb-templates:
|
||||
@echo
|
||||
@echo "...Installing thumbnails for templates..."
|
||||
|
||||
# Install thumb templates
|
||||
.PHONY: install-thumb-templates
|
||||
install-thumb-templates: echo-install-thumb-templates $(INSTALLED_THUMB_TEMPLATES)
|
||||
|
||||
|
||||
# Install a launcher icon for the Nokia 770.
|
||||
.PHONY: install-nokia770
|
||||
|
|
@ -878,7 +919,7 @@ install-dlls:
|
|||
@cp `which libstdc++-6.dll` $(BIN_PREFIX)
|
||||
@cp `which libfribidi-0.dll` $(BIN_PREFIX)
|
||||
@cp `which libpthread-2.dll` $(BIN_PREFIX)
|
||||
@if [ "x$(BDIST_WIN9X)" == "x" ]; then \
|
||||
@if [ "x$(BDIST_WIN9X)" = "x" ]; then \
|
||||
cp `which libxml2-2.dll` $(BIN_PREFIX); \
|
||||
cp `which libcairo-2.dll` $(BIN_PREFIX); \
|
||||
cp `which libfontconfig-1.dll` $(BIN_PREFIX); \
|
||||
|
|
@ -900,7 +941,7 @@ install-dlls:
|
|||
cp `which bz2-1.dll` $(BIN_PREFIX); \
|
||||
fi
|
||||
@strip -s $(BIN_PREFIX)/*.dll
|
||||
@if [ "x$(BDIST_WIN9X)" == "x" ]; then \
|
||||
@if [ "x$(BDIST_WIN9X)" = "x" ]; then \
|
||||
echo; \
|
||||
echo "...Installing Configuration Files..."; \
|
||||
cp -R win32/etc/ $(BIN_PREFIX); \
|
||||
|
|
@ -1023,8 +1064,8 @@ TuxPaint.dmg:
|
|||
# Build the program!
|
||||
|
||||
tuxpaint: obj/tuxpaint.o obj/i18n.o obj/im.o obj/cursor.o obj/pixels.o \
|
||||
obj/rgblinear.o obj/playsound.o obj/fonts.o obj/parse.o \
|
||||
obj/progressbar.o obj/dirwalk.o obj/get_fname.o obj/onscreen_keyboard.o\
|
||||
obj/rgblinear.o obj/playsound.o obj/fonts.o obj/parse.o obj/fill.o \
|
||||
obj/progressbar.o obj/dirwalk.o obj/get_fname.o obj/onscreen_keyboard.o \
|
||||
$(ARCH_LIBS)
|
||||
@echo
|
||||
@echo "...Linking Tux Paint..."
|
||||
|
|
@ -1039,7 +1080,7 @@ tuxpaint: obj/tuxpaint.o obj/i18n.o obj/im.o obj/cursor.o obj/pixels.o \
|
|||
|
||||
obj/tuxpaint.o: src/tuxpaint.c \
|
||||
src/i18n.h src/im.h src/cursor.h src/pixels.h \
|
||||
src/rgblinear.h src/playsound.h src/fonts.h \
|
||||
src/rgblinear.h src/playsound.h src/fonts.h src/fill.h \
|
||||
src/progressbar.h src/dirwalk.h src/get_fname.h \
|
||||
src/compiler.h src/debug.h \
|
||||
src/tools.h src/titles.h src/colors.h src/shapes.h \
|
||||
|
|
@ -1058,8 +1099,7 @@ obj/tuxpaint.o: src/tuxpaint.c \
|
|||
src/$(MOUSEDIR)/watch.xbm src/$(MOUSEDIR)/watch-mask.xbm \
|
||||
src/$(MOUSEDIR)/up.xbm src/$(MOUSEDIR)/up-mask.xbm \
|
||||
src/$(MOUSEDIR)/down.xbm src/$(MOUSEDIR)/down-mask.xbm \
|
||||
$(ARCH_HEADERS) \
|
||||
Makefile
|
||||
$(ARCH_HEADERS)
|
||||
@echo
|
||||
@echo "...Compiling Tux Paint from source..."
|
||||
$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(FRIBIDI_CFLAGS) $(SVG_CFLAGS) $(MOUSE_CFLAGS) $(DEFS) \
|
||||
|
|
@ -1138,6 +1178,13 @@ obj/playsound.o: src/playsound.c src/playsound.h \
|
|||
@$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(DEFS) \
|
||||
-c src/playsound.c -o obj/playsound.o
|
||||
|
||||
obj/fill.o: src/fill.c src/fill.h \
|
||||
src/rgblinear.h src/playsound.h src/pixels.h
|
||||
@echo
|
||||
@echo "...Compiling flood fill tool..."
|
||||
@$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(DEFS) \
|
||||
-c src/fill.c -o obj/fill.o
|
||||
|
||||
obj/progressbar.o: src/progressbar.c src/progressbar.h \
|
||||
src/compiler.h src/debug.h
|
||||
@echo
|
||||
|
|
@ -1165,7 +1212,7 @@ obj/win32_print.o: src/win32_print.c src/win32_print.h src/debug.h
|
|||
@$(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(DEFS) \
|
||||
-c src/win32_print.c -o obj/win32_print.o
|
||||
|
||||
obj/postscript_print.o: src/postscript_print.c Makefile \
|
||||
obj/postscript_print.o: src/postscript_print.c \
|
||||
src/postscript_print.h src/debug.h
|
||||
@echo
|
||||
@echo "...Compiling PostScript print support..."
|
||||
|
|
@ -1196,7 +1243,7 @@ src/tp_magic_api.h: src/tp_magic_api.h.in
|
|||
@(echo "/*\n\n\n\n\n\n\n\nDO NOT EDIT ME!\n\n\n\n\n\n\n\n*/" ; cat src/tp_magic_api.h.in) | sed -e s/__APIVERSION__/$(MAGIC_API_VERSION)/ > src/tp_magic_api.h
|
||||
|
||||
|
||||
tp-magic-config: src/tp-magic-config.sh.in Makefile
|
||||
tp-magic-config: src/tp-magic-config.sh.in
|
||||
@echo
|
||||
@echo "...Generating 'Magic' tool API configuration script..."
|
||||
@sed -e s/__VERSION__/$(VER_VERSION)/ \
|
||||
|
|
@ -1228,7 +1275,7 @@ PLUGIN_LIBS:=$($(OS)_PLUGIN_LIBS)
|
|||
|
||||
#MAGIC_CFLAGS:=-g3 -O2 -fvisibility=hidden -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(MAGIC_SDL_CPPFLAGS) -Isrc/
|
||||
MAGIC_CFLAGS:=-g3 -O2 -fno-common -W -Wstrict-prototypes -Wmissing-prototypes -Wall $(MAGIC_SDL_CPPFLAGS) -Isrc/ $(ARCH_CFLAGS)
|
||||
SHARED_FLAGS:=-shared -fpic
|
||||
SHARED_FLAGS:=-shared -fpic -lm
|
||||
|
||||
MAGIC_C:=$(wildcard magic/src/*.c)
|
||||
MAGIC_SO:=$(patsubst magic/src/%.c,magic/%.$(SO_TYPE),$(MAGIC_C))
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 632 B |
|
|
@ -2,12 +2,12 @@ AUTHORS.txt for Tux Paint
|
|||
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2018
|
||||
Copyright (c) 2002-2019
|
||||
Various contributors (see below, and CHANGES.txt)
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
||||
June 17, 2002 - August 30, 2018
|
||||
June 17, 2002 - September 12, 2019
|
||||
|
||||
$Id$
|
||||
|
||||
|
|
@ -1069,7 +1069,7 @@ $Id$
|
|||
Alessandro Pasotti <apasotti@gmail.com>
|
||||
|
||||
* BeOS coding and builds
|
||||
Luc 'Begasus' Schrijvers <Begasus@skynet.be>
|
||||
Luc 'Begasus' Schrijvers <begasus@gmail.com>
|
||||
Scott McCreary <scottmc@users.sourceforge.net>
|
||||
Marcin 'Shard' Konicki <shard at beosjournal.org> [retired]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,21 @@ http://www.tuxpaint.org/
|
|||
|
||||
$Id$
|
||||
|
||||
2019.Apr.3 (0.9.24)
|
||||
2019.Sep.21 (0.9.24)
|
||||
* New tools
|
||||
---------
|
||||
* Fill
|
||||
Not actually a new tool, but promoted from a "Magic" tool
|
||||
to a full-fledge tool in the "Tools" bar. However, also
|
||||
avoids filling "Undo" buffer with snapshots of the drawing,
|
||||
if the fill does nothing (e.g., if you click the same spot
|
||||
a second time).
|
||||
|
||||
* Ports & Building
|
||||
----------------
|
||||
* Updates to build on Haiku.
|
||||
Luc 'Begasus' Schrijvers <begasus@gmail.com>
|
||||
|
||||
* Bug Fixes
|
||||
---------
|
||||
* Correct issue that prevented Tux Paint from lauching on Mac OS X 10.7.
|
||||
|
|
@ -26,6 +40,9 @@ $Id$
|
|||
or configure Tux Paint to always bring up the dialog upon print.
|
||||
Mark K. Kim <mkkim214@gmail.com>
|
||||
|
||||
* Made sure "New" dialog created correct thumbnail subdirectories
|
||||
for personal Starters & Templates (e.g., ~/.tuxpaint/starters/thumbs/)
|
||||
|
||||
* Other Improvements
|
||||
------------------
|
||||
* Added ability to move color palette options to the end of
|
||||
|
|
@ -42,6 +59,20 @@ $Id$
|
|||
(Thanks to Flavio Airundo for the idea; closes
|
||||
https://sourceforge.net/p/tuxpaint/feature-requests/188/)
|
||||
|
||||
* Updated most parts of the code that were throwing warnings in GCC.
|
||||
|
||||
* Build process generates thumbnails of included Starters and Templates.
|
||||
When installed, this greatly increases the speed of the "New" dialog.
|
||||
|
||||
* Updated some Starter source images so they work better with
|
||||
flood fill (Bald Eagle, World map, Gecko).
|
||||
|
||||
* Ability to disable stereo panning effect (e.g., paint brush, UI
|
||||
elements sound effect feedback, etc.), useful for users with
|
||||
hearing impairment in one ear, or situations where one speaker or
|
||||
headphone is being used. Use "--nostereo" command-line option
|
||||
or "nostereo=yes" config. file option.
|
||||
|
||||
* Documentation updates
|
||||
---------------------
|
||||
* Mended link to MinGW/MSYS instructions at John Popplewell's website.
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
Options Documentation
|
||||
|
||||
Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt
|
||||
Copyright (c) 2002-2019 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
December 18, 2018
|
||||
September 21, 2019
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
@ -129,6 +129,11 @@ Windows Users
|
|||
used to reenable sounds if they were disabled using this
|
||||
option.)
|
||||
|
||||
nostereo=yes
|
||||
Disable stereo panning support. (Useful for users with hearing
|
||||
impairment in one ear, or places where a single speaker or
|
||||
headphone is being used.)
|
||||
|
||||
noquit=yes
|
||||
|
||||
Disable the on-screen "Quit" button and prevent the [Escape]
|
||||
|
|
@ -963,6 +968,7 @@ Windows Users
|
|||
--allowscreensaver
|
||||
--startblank
|
||||
--nosound
|
||||
--nostereo
|
||||
--noquit
|
||||
--noprint
|
||||
--printdelay=SECONDS
|
||||
|
|
@ -1036,6 +1042,7 @@ Windows Users
|
|||
--disablescreensaver
|
||||
--startlast
|
||||
--sound
|
||||
--stereo
|
||||
--quit
|
||||
--print
|
||||
--printdelay=0
|
||||
|
|
@ -1137,287 +1144,285 @@ Command-Line Informational Options
|
|||
Available Languages
|
||||
|
||||
+------------------------------------------------------------------+
|
||||
| |Language |Language |Input Method |
|
||||
|Locale Code |(native name) |(English name) |Cycle Key |
|
||||
| | | |Combination |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|C | |English | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ach_UG |Acoli |Acholi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|af_ZA | |Afrikaans | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ak_GH | |Akan | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|am_ET | |Amharic | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|an_ES | |Aragones | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ar_SA | |Arabic | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|as_IN | |Assamese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ast_ES | |Asturian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|az_AZ | |Azerbaijani | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|bm_ML | |Bambara | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|bn_IN | |Bengali | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|be_BY |Bielaruskaja |Belarusian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|bg_BG | |Bulgarian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|bo_CN (*) | |Tibetan | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|br_FR |Brezhoneg |Breton | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|brx_IN | |Bodo | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|bs_BA | |Bosnian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ca_ES |Català |Catalan | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ca_ES@valencia |Valencia |Valencian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|cgg_UG |Chiga |Kiga | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|cs_CZ |Cesky |Czech | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|cy_GB |Cymraeg |Welsh | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|da_DK |Dansk |Danish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|de_DE |Deutsch |German | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|doi_IN | |Dogri | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|et_EE | |Estonian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|el_GR (*) | |Greek | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|en_AU | |Australian | |
|
||||
| | |English | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|en_CA | |Canadian | |
|
||||
| | |English | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|en_GB | |British English| |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|en_ZA | |South African | |
|
||||
| | |English | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|eo | |Esperanto | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|es_ES |Español |Spanish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|es_MX |Español-Mejicano|Mexican Spanish| |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|eu_ES |Euskara |Basque | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|fa_IR | |Persian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ff_SN |Fulah |Fula | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|fi_FI |Suomi |Finnish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|fo_FO | |Faroese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|fr_FR |Français |French | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ga_IE |Gàidhlig |Irish Gaelic | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|gd_GB |Ghaidhlig |Scottish Gaelic| |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|gl_ES |Galego |Galician | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|gos_NL |Zudelk |Gronings | |
|
||||
| |Veenkelonioals | | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|gu_IN | |Gujarati | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|he_IL (*) | |Hebrew | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|hi_IN (*) | |Hindi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|hr_HR |Hrvatski |Croatian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|hu_HU |Magyar |Hungarian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|hy_AM |Hayeren |Armenian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|id_ID |Bahasa Indonesia|Indonesian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|is_IS |Íslenska |Icelandic | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|it_IT |Italiano |Italian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|iu_CA | |Inuktitut | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ja_JP (*) | |Japanese |right [Alt] |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ka_GE | |Georgian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|kab | |Kabyle | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|km_KH | |Khmer | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|kn_IN | |Kannada | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ko_KR (*) | |Korean |right [Alt] or |
|
||||
| | | |left [Alt] |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|kok_IN | |Konkani | |
|
||||
| | |(Devaganari) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|kok@roman | |Konkani (Roman)| |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ks_IN@devanagari| |Kashmiri | |
|
||||
| | |(Devanagari) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ks_IN | |Kashmiri | |
|
||||
| | |(Perso-Arabic) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ku_TR | |Kurdish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|lb_LU |Letzebuergesch |Luxembourgish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|lg_UG | |Luganda | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|lt_LT |Lietuviu |Lithuanian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|lv_LV | |Latvian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mk_MK | |Macedonian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mai_IN | |Maithili | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ml_IN | |Malayalam | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mn_MN | |Mongolian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mni_IN | |Manipuri | |
|
||||
| | |(Bengali) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mni@meiteimayek | |Manipuri | |
|
||||
| | |(Meitei Mayek) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|mr_IN | |Marathi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ms_MY | |Malay | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|nb_NO |Norsk (bokmål) |Norwegian | |
|
||||
| | |Bokmål | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ne_NP |Nepali | | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|nl_NL | |Dutch | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|nn_NO |Norsk (nynorsk) |Norwegian | |
|
||||
| | |Nynorsk | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|nr_ZA | |Ndebele | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|nso_ZA |Sesotho sa Leboa|Northern Sotho | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|oc_FR | |Occitan | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|oj_CA | |Ojibwe |Ojibway |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|pa_IN | |Punjabi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|or_IN | |Odia |Oriya |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|pl_PL |Polski |Polish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|pt_BR |Portugês |Brazilian | |
|
||||
| |Brazileiro |Portuguese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|pt_PT |Portugês |Portuguese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ro_RO | |Romanian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ru_RU |Russkiy |Russian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|rw_RW | |Kinyarwanda | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sa_IN | |Sanskrit | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sat_IN | |Santali | |
|
||||
| | |(Devaganari) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sat@olchiki | |Santali | |
|
||||
| | |(Ol-Chikii) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|shs_CA |Secwepemctin |Shuswap | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|si_LK | |Sinhala | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sd_IN@devanagari| |Sindhi | |
|
||||
| | |(Devanagari) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sd_IN | |Sindhi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sk_SK | |Slovak | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sl_SI | |Slovenian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|son | |Songhay | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sq_AL | |Albanian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sr_YU | |Serbian | |
|
||||
| | |(cyrillic) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sr_RS@latin | |Serbian (latin)| |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|su_ID | |Sundanese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sv_SE |Svenska |Swedish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|sw_TZ | |Swahili | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ta_IN (*) | |Tamil | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|te_IN (*) | |Telugu | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|th_TH (*) | |Thai | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|tl_PH (*) | |Tagalog | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|tlh |tlhIngan |Klingon | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|tr_TR | |Turkish | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|tw_GH | |Twi | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|uk_UA | |Ukrainian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ur_IN | |Urdu | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|ve_ZA | |Venda | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|vec |Venèto |Venetian | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|vi_VN | |Vietnamese | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|wa_BE | |Walloon | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|wo_SN | |Wolof | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|xh_ZA | |Xhosa | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|zh_CN (*) | |Chinese | |
|
||||
| | |(Simplified) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|zh_TW (*) | |Chinese | |
|
||||
| | |(Traditional) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|zam | |Zapotec | |
|
||||
| | |(Miahuatlan) | |
|
||||
|----------------+----------------+---------------+----------------|
|
||||
|zu_ZA | |Zulu | |
|
||||
| |Language |Language |Input Method |
|
||||
|Locale Code |(native name) |(English name) |Cycle Key |
|
||||
| | | |Combination |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|C | |English | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ach_UG |Acoli |Acholi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|af_ZA | |Afrikaans | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ak_GH | |Akan | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|am_ET | |Amharic | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|an_ES | |Aragones | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ar_SA | |Arabic | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|as_IN | |Assamese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ast_ES | |Asturian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|az_AZ | |Azerbaijani | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|bm_ML | |Bambara | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|bn_IN | |Bengali | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|be_BY |Bielaruskaja |Belarusian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|bg_BG | |Bulgarian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|bo_CN (*) | |Tibetan | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|br_FR |Brezhoneg |Breton | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|brx_IN | |Bodo | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|bs_BA | |Bosnian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ca_ES |Català |Catalan | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ca_ES@valencia |Valencia |Valencian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|cgg_UG |Chiga |Kiga | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|cs_CZ |Cesky |Czech | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|cy_GB |Cymraeg |Welsh | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|da_DK |Dansk |Danish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|de_DE |Deutsch |German | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|doi_IN | |Dogri | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|et_EE | |Estonian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|el_GR (*) | |Greek | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|en_AU | |Australian | |
|
||||
| | |English | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|en_CA | |Canadian English| |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|en_GB | |British English | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|en_ZA | |South African | |
|
||||
| | |English | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|eo | |Esperanto | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|es_ES |Español |Spanish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|es_MX |Español-Mejicano|Mexican Spanish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|eu_ES |Euskara |Basque | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|fa_IR | |Persian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ff_SN |Fulah |Fula | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|fi_FI |Suomi |Finnish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|fo_FO | |Faroese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|fr_FR |Français |French | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ga_IE |Gàidhlig |Irish Gaelic | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|gd_GB |Ghaidhlig |Scottish Gaelic | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|gl_ES |Galego |Galician | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|gos_NL |Zudelk |Gronings | |
|
||||
| |Veenkelonioals | | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|gu_IN | |Gujarati | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|he_IL (*) | |Hebrew | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|hi_IN (*) | |Hindi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|hr_HR |Hrvatski |Croatian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|hu_HU |Magyar |Hungarian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|hy_AM |Hayeren |Armenian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|id_ID |Bahasa Indonesia|Indonesian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|is_IS |Íslenska |Icelandic | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|it_IT |Italiano |Italian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|iu_CA | |Inuktitut | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ja_JP (*) | |Japanese |right [Alt] |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ka_GE | |Georgian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|kab | |Kabyle | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|km_KH | |Khmer | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|kn_IN | |Kannada | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ko_KR (*) | |Korean |right [Alt] or |
|
||||
| | | |left [Alt] |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|kok_IN | |Konkani | |
|
||||
| | |(Devaganari) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|kok@roman | |Konkani (Roman) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ks_IN@devanagari| |Kashmiri | |
|
||||
| | |(Devanagari) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ks_IN | |Kashmiri | |
|
||||
| | |(Perso-Arabic) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ku_TR | |Kurdish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|lb_LU |Letzebuergesch |Luxembourgish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|lg_UG | |Luganda | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|lt_LT |Lietuviu |Lithuanian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|lv_LV | |Latvian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mk_MK | |Macedonian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mai_IN | |Maithili | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ml_IN | |Malayalam | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mn_MN | |Mongolian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mni_IN | |Manipuri | |
|
||||
| | |(Bengali) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mni@meiteimayek | |Manipuri (Meitei| |
|
||||
| | |Mayek) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|mr_IN | |Marathi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ms_MY | |Malay | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|nb_NO |Norsk (bokmål) |Norwegian Bokmål| |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ne_NP |Nepali | | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|nl_NL | |Dutch | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|nn_NO |Norsk (nynorsk) |Norwegian | |
|
||||
| | |Nynorsk | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|nr_ZA | |Ndebele | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|nso_ZA |Sesotho sa Leboa|Northern Sotho | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|oc_FR | |Occitan | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|oj_CA | |Ojibwe |Ojibway |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|pa_IN | |Punjabi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|or_IN | |Odia |Oriya |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|pl_PL |Polski |Polish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|pt_BR |Portugês |Brazilian | |
|
||||
| |Brazileiro |Portuguese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|pt_PT |Portugês |Portuguese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ro_RO | |Romanian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ru_RU |Russkiy |Russian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|rw_RW | |Kinyarwanda | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sa_IN | |Sanskrit | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sat_IN | |Santali | |
|
||||
| | |(Devaganari) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sat@olchiki | |Santali | |
|
||||
| | |(Ol-Chikii) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|shs_CA |Secwepemctin |Shuswap | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|si_LK | |Sinhala | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sd_IN@devanagari| |Sindhi | |
|
||||
| | |(Devanagari) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sd_IN | |Sindhi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sk_SK | |Slovak | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sl_SI | |Slovenian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|son | |Songhay | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sq_AL | |Albanian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sr_YU | |Serbian | |
|
||||
| | |(cyrillic) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sr_RS@latin | |Serbian (latin) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|su_ID | |Sundanese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sv_SE |Svenska |Swedish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|sw_TZ | |Swahili | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ta_IN (*) | |Tamil | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|te_IN (*) | |Telugu | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|th_TH (*) | |Thai | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|tl_PH (*) | |Tagalog | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|tlh |tlhIngan |Klingon | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|tr_TR | |Turkish | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|tw_GH | |Twi | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|uk_UA | |Ukrainian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ur_IN | |Urdu | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|ve_ZA | |Venda | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|vec |Venèto |Venetian | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|vi_VN | |Vietnamese | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|wa_BE | |Walloon | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|wo_SN | |Wolof | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|xh_ZA | |Xhosa | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|zh_CN (*) | |Chinese | |
|
||||
| | |(Simplified) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|zh_TW (*) | |Chinese | |
|
||||
| | |(Traditional) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|zam | |Zapotec | |
|
||||
| | |(Miahuatlan) | |
|
||||
|----------------+----------------+----------------+---------------|
|
||||
|zu_ZA | |Zulu | |
|
||||
+------------------------------------------------------------------+
|
||||
|
||||
(*) - These languages require their own fonts, since they are not
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
Copyright 2002-2019 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
June 14, 2002 - April 3, 2019
|
||||
June 14, 2002 - September 21, 2019
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
@ -375,6 +375,16 @@ Available Tools
|
|||
left [Alt]
|
||||
* Thai — right [Alt]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Fill
|
||||
|
||||
The 'Fill' tool 'flood-fills' a contiguous area of your
|
||||
drawing with a solid color of your choice.
|
||||
|
||||
Note: Prior to Tux Paint 0.9.24, this was a "Magic" tool
|
||||
(see below).
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Magic (Special Effects)
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ version
|
|||
</h1>
|
||||
<h2>Options Documentation</h2>
|
||||
|
||||
<p>Copyright (c) 2002-2018 by various contributors; see AUTHORS.txt<br/>
|
||||
<p>Copyright (c) 2002-2019 by various contributors; see AUTHORS.txt<br/>
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
<p>December 18, 2018</p>
|
||||
<p>September 21, 2019</p>
|
||||
|
||||
|
||||
</center>
|
||||
|
|
@ -192,6 +192,12 @@ version
|
|||
cannot be used to reenable sounds if they were disabled using this option.)
|
||||
</dd>
|
||||
|
||||
<dt><code><b>nostereo=yes</b></code></dt>
|
||||
<dd>
|
||||
Disable stereo panning support. (Useful for users with hearing impairment
|
||||
in one ear, or places where a single speaker or headphone is being used.)
|
||||
</dd>
|
||||
|
||||
<dt><code><b>noquit=yes</b></code></dt>
|
||||
<dd>
|
||||
<p>Disable the on-screen "Quit" button and prevent the <b>[Escape]</b> key
|
||||
|
|
@ -1530,6 +1536,7 @@ version
|
|||
--allowscreensaver<br>
|
||||
--startblank<br>
|
||||
--nosound<br>
|
||||
--nostereo<br>
|
||||
--noquit<br>
|
||||
--noprint<br>
|
||||
--printdelay=<i>SECONDS</i><br>
|
||||
|
|
@ -1606,6 +1613,7 @@ version
|
|||
--disablescreensaver<br>
|
||||
--startlast<br>
|
||||
--sound<br>
|
||||
--stereo<br>
|
||||
--quit<br>
|
||||
--print<br>
|
||||
--printdelay=0<br>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ version
|
|||
|
||||
<p>June 14, 2002 -
|
||||
|
||||
April 3, 2019</p>
|
||||
September 21, 2019</p>
|
||||
|
||||
</center>
|
||||
|
||||
|
|
@ -507,6 +507,17 @@ version
|
|||
<hr size=1>
|
||||
</dd>
|
||||
|
||||
<dt><b>Fill</b></dt>
|
||||
<dd>
|
||||
<img src="../../html/images/tool_fill.png" width=48 height=48 alt="" align=right>
|
||||
|
||||
<p>The 'Fill' tool 'flood-fills' a contiguous area of your drawing
|
||||
with a solid color of your choice.</p>
|
||||
|
||||
<p>Note: Prior to Tux Paint 0.9.24, this was a "Magic" tool (see below).</p>
|
||||
|
||||
<hr size=1>
|
||||
</dd>
|
||||
|
||||
<dt><b>Magic (Special Effects)</b></dt>
|
||||
<dd>
|
||||
|
|
|
|||
BIN
docs/html/images/tool_fill.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -5,7 +5,7 @@ individual HTML files for each of them, and an index.html that links to
|
|||
them all. */
|
||||
|
||||
/* Bill Kendrick <bill@newbreedsoftware.com> */
|
||||
/* Oct. 8, 2009 - August 30, 2018 */
|
||||
/* Oct. 8, 2009 - September 12, 2019 */
|
||||
|
||||
|
||||
/* Authors of the Magic tools: */
|
||||
|
|
@ -114,10 +114,6 @@ $tools = array(
|
|||
'author'=>$AUTHOR_KENDRICK,
|
||||
'see'=>array('Edges', 'Silhouette')),
|
||||
|
||||
array('name'=>'Fill',
|
||||
'desc'=>'This floods the picture with a color. It lets you quickly fill parts of the picture, as if it were a coloring book.',
|
||||
'author'=>$AUTHOR_KENDRICK),
|
||||
|
||||
array('name'=>'Fisheye',
|
||||
'desc'=>'Warp parts of your picture like it\'s being seen through a fisheye lens.',
|
||||
'author'=>$AUTHOR_ADAMR),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
alien.c
|
||||
//
|
||||
|
||||
alien, Modifies the colours of the image.
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com> inspired by the Alien Map GIMP plugin
|
||||
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: June 6, 2008
|
||||
Last updated: August 29, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -168,9 +168,6 @@ static void do_alien_pixel(void *ptr, int which ATTRIBUTE_UNUSED,
|
|||
// Do the effect for the full image
|
||||
static void do_alien_full(void *ptr, SDL_Surface * canvas, SDL_Surface * last, int which)
|
||||
{
|
||||
|
||||
magic_api *api = (magic_api *) ptr;
|
||||
|
||||
int x, y;
|
||||
|
||||
for (y = 0; y < last->h; y++)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Calligraphy Magic Tool Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: July 8, 2008
|
||||
Last updated: August 29, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -137,7 +137,6 @@ void calligraphy_drag(magic_api * api, int which ATTRIBUTE_UNUSED, SDL_Surface *
|
|||
{
|
||||
Point2D *curve;
|
||||
int i, n_points, thick, new_thick;
|
||||
Uint32 colr;
|
||||
SDL_Rect src, dest;
|
||||
|
||||
// if (SDL_GetTicks() < calligraphy_last_time + 5)
|
||||
|
|
@ -184,8 +183,6 @@ void calligraphy_drag(magic_api * api, int which ATTRIBUTE_UNUSED, SDL_Surface *
|
|||
|
||||
calligraphy_ComputeBezier(calligraphy_control_points, n_points, curve);
|
||||
|
||||
colr = SDL_MapRGB(canvas->format, calligraphy_r, calligraphy_g, calligraphy_b);
|
||||
|
||||
new_thick = 40 - min((n_points /* / 2 */ ), 32);
|
||||
|
||||
for (i = 0; i < n_points - 1; i++)
|
||||
|
|
@ -218,23 +215,6 @@ void calligraphy_drag(magic_api * api, int which ATTRIBUTE_UNUSED, SDL_Surface *
|
|||
dest.y = y;
|
||||
|
||||
SDL_BlitSurface(calligraphy_colored_brush, &src, canvas, &dest);
|
||||
|
||||
/* Old way; using putpixel:
|
||||
SDL_LockSurface(canvas);
|
||||
|
||||
for (j = -(thick / 2); j < (thick / 2) + 1; j++)
|
||||
{
|
||||
x = curve[i].x + j;
|
||||
y = curve[i].y - (j / 2); // 30 degrees
|
||||
|
||||
api->putpixel(canvas, x, y, colr);
|
||||
api->putpixel(canvas, x + 1, y, colr);
|
||||
api->putpixel(canvas, x, y + 1, colr);
|
||||
api->putpixel(canvas, x + 1, y + 1, colr);
|
||||
}
|
||||
|
||||
SDL_UnlockSurface(canvas);
|
||||
*/
|
||||
}
|
||||
|
||||
calligraphy_old_thick = (calligraphy_old_thick + new_thick) / 2;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
Emboss Magic Tool Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: July 8, 2008
|
||||
Last updated: August 29, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ static void do_emboss(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canva
|
|||
magic_api *api = (magic_api *) ptr;
|
||||
int xx, yy;
|
||||
Uint8 r1, g1, b1, r2, g2, b2;
|
||||
int r, g, b;
|
||||
int r;
|
||||
float h, s, v;
|
||||
int avg1, avg2;
|
||||
|
||||
|
|
@ -139,7 +139,6 @@ static void do_emboss(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canva
|
|||
r = 0;
|
||||
if (r > 255)
|
||||
r = 255;
|
||||
g = b = r;
|
||||
|
||||
v = (r / 255.0);
|
||||
|
||||
|
|
|
|||
268
magic/src/fill.c
|
|
@ -1,268 +0,0 @@
|
|||
/*
|
||||
fill.c
|
||||
|
||||
Fill Magic Tool Plugin
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
Flood fill code based on Wikipedia example:
|
||||
http://www.wikipedia.org/wiki/Flood_fill/C_example
|
||||
by Damian Yerrick - http://www.wikipedia.org/wiki/Damian_Yerrick
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: July 8, 2008
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "tp_magic_api.h"
|
||||
#include "SDL_image.h"
|
||||
|
||||
|
||||
/* Our globals: */
|
||||
|
||||
static Mix_Chunk *fill_snd;
|
||||
static Uint8 fill_r, fill_g, fill_b;
|
||||
|
||||
/* Local function prototypes: */
|
||||
|
||||
static int colors_close(magic_api * api, SDL_Surface * canvas, Uint32 c1, Uint32 c2);
|
||||
static void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr);
|
||||
int fill_modes(magic_api * api, int which);
|
||||
void fill_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
void fill_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
int fill_requires_colors(magic_api * api, int which);
|
||||
void fill_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
void fill_shutdown(magic_api * api);
|
||||
void fill_release(magic_api * api, int which,
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
|
||||
void fill_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
|
||||
void fill_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
|
||||
char *fill_get_description(magic_api * api, int which, int mode);
|
||||
char *fill_get_name(magic_api * api, int which);
|
||||
int fill_get_tool_count(magic_api * api);
|
||||
SDL_Surface *fill_get_icon(magic_api * api, int which);
|
||||
Uint32 fill_api_version(void);
|
||||
int fill_init(magic_api * api);
|
||||
|
||||
|
||||
// No setup required:
|
||||
int fill_init(magic_api * api)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%ssounds/magic/fill.wav", api->data_directory);
|
||||
fill_snd = Mix_LoadWAV(fname);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
Uint32 fill_api_version(void)
|
||||
{
|
||||
return (TP_MAGIC_API_VERSION);
|
||||
}
|
||||
|
||||
// We have multiple tools:
|
||||
int fill_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
// Load our icons:
|
||||
SDL_Surface *fill_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
snprintf(fname, sizeof(fname), "%simages/magic/fill.png", api->data_directory);
|
||||
|
||||
return (IMG_Load(fname));
|
||||
}
|
||||
|
||||
// Return our names, localized:
|
||||
char *fill_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (strdup(gettext_noop("Fill")));
|
||||
}
|
||||
|
||||
// Return our descriptions, localized:
|
||||
char *fill_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (strdup(gettext_noop("Click in the picture to fill that area with color.")));
|
||||
}
|
||||
|
||||
|
||||
// Affect the canvas on drag:
|
||||
void fill_drag(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * last ATTRIBUTE_UNUSED, int ox ATTRIBUTE_UNUSED, int oy ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
// Affect the canvas on click:
|
||||
void fill_click(magic_api * api, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||
int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
do_flood_fill(api, canvas, x, y, SDL_MapRGB(canvas->format, fill_r, fill_g, fill_b), api->getpixel(canvas, x, y));
|
||||
|
||||
update_rect->x = 0;
|
||||
update_rect->y = 0;
|
||||
update_rect->w = canvas->w;
|
||||
update_rect->h = canvas->h;
|
||||
}
|
||||
|
||||
void fill_release(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED,
|
||||
int x ATTRIBUTE_UNUSED, int y ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void fill_shutdown(magic_api * api ATTRIBUTE_UNUSED)
|
||||
{
|
||||
Mix_FreeChunk(fill_snd);
|
||||
}
|
||||
|
||||
// Record the color from Tux Paint:
|
||||
void fill_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g, Uint8 b)
|
||||
{
|
||||
fill_r = r;
|
||||
fill_g = g;
|
||||
fill_b = b;
|
||||
}
|
||||
|
||||
// Use colors:
|
||||
int fill_requires_colors(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int colors_close(magic_api * api, SDL_Surface * canvas, Uint32 c1, Uint32 c2)
|
||||
{
|
||||
Uint8 r1, g1, b1, r2, g2, b2;
|
||||
|
||||
if (c1 == c2)
|
||||
{
|
||||
/* Get it over with quick, if possible! */
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
double r, g, b;
|
||||
|
||||
SDL_GetRGB(c1, canvas->format, &r1, &g1, &b1);
|
||||
SDL_GetRGB(c2, canvas->format, &r2, &g2, &b2);
|
||||
|
||||
// use distance in linear RGB space
|
||||
r = api->sRGB_to_linear(r1) - api->sRGB_to_linear(r2);
|
||||
r *= r;
|
||||
g = api->sRGB_to_linear(g1) - api->sRGB_to_linear(g2);
|
||||
g *= g;
|
||||
b = api->sRGB_to_linear(b1) - api->sRGB_to_linear(b2);
|
||||
b *= b;
|
||||
|
||||
// easy to confuse:
|
||||
// dark grey, brown, purple
|
||||
// light grey, tan
|
||||
// red, orange
|
||||
return r + g + b < 0.04;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void do_flood_fill(magic_api * api, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr)
|
||||
{
|
||||
int fillL, fillR, i, in_line;
|
||||
static unsigned char prog_anim;
|
||||
|
||||
|
||||
if (cur_colr == old_colr || colors_close(api, canvas, cur_colr, old_colr))
|
||||
return;
|
||||
|
||||
|
||||
fillL = x;
|
||||
fillR = x;
|
||||
|
||||
prog_anim++;
|
||||
if ((prog_anim % 4) == 0)
|
||||
{
|
||||
api->update_progress_bar();
|
||||
api->playsound(fill_snd, (x * 255) / canvas->w, 255);
|
||||
}
|
||||
|
||||
|
||||
/* Find left side, filling along the way */
|
||||
|
||||
in_line = 1;
|
||||
|
||||
while (in_line)
|
||||
{
|
||||
api->putpixel(canvas, fillL, y, cur_colr);
|
||||
fillL--;
|
||||
|
||||
in_line = (fillL < 0) ? 0 : colors_close(api, canvas, api->getpixel(canvas, fillL, y), old_colr);
|
||||
}
|
||||
|
||||
fillL++;
|
||||
|
||||
/* Find right side, filling along the way */
|
||||
|
||||
in_line = 1;
|
||||
while (in_line)
|
||||
{
|
||||
api->putpixel(canvas, fillR, y, cur_colr);
|
||||
fillR++;
|
||||
|
||||
in_line = (fillR >= canvas->w) ? 0 : colors_close(api, canvas, api->getpixel(canvas, fillR, y), old_colr);
|
||||
}
|
||||
|
||||
fillR--;
|
||||
|
||||
|
||||
/* Search top and bottom */
|
||||
|
||||
for (i = fillL; i <= fillR; i++)
|
||||
{
|
||||
if (y > 0 && colors_close(api, canvas, api->getpixel(canvas, i, y - 1), old_colr))
|
||||
do_flood_fill(api, canvas, i, y - 1, cur_colr, old_colr);
|
||||
|
||||
if (y < canvas->h && colors_close(api, canvas, api->getpixel(canvas, i, y + 1), old_colr))
|
||||
do_flood_fill(api, canvas, i, y + 1, cur_colr, old_colr);
|
||||
}
|
||||
}
|
||||
|
||||
void fill_switchin(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void fill_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED,
|
||||
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
int fill_modes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (MODE_PAINT);
|
||||
}
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* Folds the picture down from the corners.
|
||||
*
|
||||
* Last updated: 2019-08-29
|
||||
*/
|
||||
|
||||
//optimized version soon :)
|
||||
//when "folding" same corner many times it gives strange results. Now it's allowed. Let me know
|
||||
//if you think it shouldn't be.
|
||||
|
|
@ -142,25 +148,29 @@ void fold_draw(magic_api * api, int which,
|
|||
right_step_y = (float)(y - left_arm_y) / (float)(left_arm_x - fold_ox);
|
||||
left_step_x = (float)(x - right_arm_x) / (float)(right_arm_y - fold_oy);
|
||||
left_step_y = (float)(y - right_arm_y) / (float)(right_arm_y - fold_oy);
|
||||
|
||||
left_y = (float)right_arm_y / left_arm_x * (left_arm_x - canvas->w);
|
||||
right_x = (float)left_arm_x / right_arm_y * (right_arm_y - canvas->h);
|
||||
|
||||
for (w = 0; w < canvas->w; w += 0.5)
|
||||
for (h = 0; h < canvas->h; h += 0.5)
|
||||
{
|
||||
dist_x = right_step_x * w + left_step_x * h;
|
||||
dist_y = right_step_y * w + left_step_y * h;
|
||||
api->putpixel(canvas, x - dist_x, y - dist_y, api->getpixel(temp, w, h));
|
||||
}
|
||||
{
|
||||
for (h = 0; h < canvas->h; h += 0.5)
|
||||
{
|
||||
dist_x = right_step_x * w + left_step_x * h;
|
||||
dist_y = right_step_y * w + left_step_y * h;
|
||||
api->putpixel(canvas, x - dist_x, y - dist_y, api->getpixel(temp, w, h));
|
||||
}
|
||||
}
|
||||
|
||||
// Erasing the triangle.
|
||||
// The 1 pixel in plus is a workaround for api-line not getting the end in some lines.
|
||||
if (left_arm_x > canvas->w)
|
||||
{
|
||||
left_y = (float)right_arm_y / left_arm_x * (left_arm_x - canvas->w);
|
||||
for (h = 0; h <= right_arm_y; h++)
|
||||
api->line((void *)api, which, canvas, snapshot, canvas->w, left_y - h, -1, right_arm_y - h, 1, fold_erase);
|
||||
}
|
||||
else if (right_arm_y > canvas->h)
|
||||
{
|
||||
right_x = (float)left_arm_x / right_arm_y * (right_arm_y - canvas->h);
|
||||
for (w = 0; w <= left_arm_x; w++)
|
||||
api->line((void *)api, which, canvas, snapshot, left_arm_x - w, 0, right_x - w, canvas->h + 1, 1, fold_erase);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* Draws fretwork
|
||||
*
|
||||
* Last updated: 2019-08-29
|
||||
*/
|
||||
|
||||
#include "tp_magic_api.h"
|
||||
#include "SDL_image.h"
|
||||
#include "SDL_mixer.h"
|
||||
|
|
@ -29,7 +35,7 @@
|
|||
Mix_Chunk *fretwork_snd;
|
||||
unsigned int img_w, img_h;
|
||||
unsigned int fretwork_segments_x, fretwork_segments_y; //how many segments do we have?
|
||||
static int fretwork_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
|
||||
inline int fretwork_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
|
||||
static Uint8 *fretwork_status_of_segments; //a place to store an info about bitmap used for selected segment
|
||||
static char **fretwork_images; //the pathes to all the images needed
|
||||
static unsigned int fretwork_segment_modified; //which segment was modified this time?
|
||||
|
|
@ -243,7 +249,7 @@ void fretwork_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UN
|
|||
// Interactivity functions
|
||||
|
||||
|
||||
static int fretwork_math_ceil(int x, int y)
|
||||
inline int fretwork_math_ceil(int x, int y)
|
||||
{
|
||||
int temp;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Credits: Andrew Corcoran <akanewbie@gmail.com>
|
||||
|
||||
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: May 6, 2009
|
||||
Last updated: August 29, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -86,9 +86,11 @@ void perspective_line(void *ptr_to_api, int which, SDL_Surface * canvas, SDL_Sur
|
|||
|
||||
|
||||
|
||||
/* Unused?
|
||||
static const int perspective_AMOUNT = 300;
|
||||
static const int perspective_RADIUS = 16;
|
||||
static const double perspective_SHARPEN = 1.0;
|
||||
*/
|
||||
Uint8 perspective_r, perspective_g, perspective_b;
|
||||
int corner;
|
||||
int dash;
|
||||
|
|
@ -396,12 +398,10 @@ void perspective_release(magic_api * api, int which,
|
|||
}
|
||||
else
|
||||
{
|
||||
int aux_x, aux_y, aux_h, aux_w;
|
||||
int aux_h, aux_w;
|
||||
|
||||
aux_h = canvas->h * canvas->h / new_h;
|
||||
aux_w = canvas->w * aux_h / canvas->h;
|
||||
aux_x = canvas->w / 2 - aux_w / 2;
|
||||
aux_y = canvas->h / 2 - aux_h / 2;
|
||||
|
||||
update_rect->x = canvas->w / 2 - aux_w / 2;
|
||||
update_rect->y = canvas->h / 2 - aux_h / 2;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
Mix_Chunk *rails_snd;
|
||||
unsigned int img_w, img_h;
|
||||
unsigned int rails_segments_x, rails_segments_y; //how many segments do we have?
|
||||
static int rails_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
|
||||
inline int rails_math_ceil(int x, int y); //ceil() in cstdlib returns float and is relative slow, so we'll use our one
|
||||
static Uint8 *rails_status_of_segments; //a place to store an info about bitmap used for selected segment
|
||||
static char **rails_images; //the pathes to all the images needed
|
||||
static unsigned int rails_segment_modified; //which segment was modified this time?
|
||||
|
|
@ -55,7 +55,6 @@ void rails_release(magic_api * api, int which,
|
|||
void rails_shutdown(magic_api * api);
|
||||
void rails_switchin(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
void rails_switchout(magic_api * api, int which, int mode, SDL_Surface * canvas);
|
||||
static int rails_math_ceil(int x, int y);
|
||||
inline unsigned int rails_get_segment(int x, int y);
|
||||
inline void rails_extract_coords_from_segment(unsigned int segment, Sint16 * x, Sint16 * y);
|
||||
static void rails_flip(void *ptr, SDL_Surface * dest, SDL_Surface * src);
|
||||
|
|
@ -197,7 +196,7 @@ void rails_switchout(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSE
|
|||
|
||||
// Interactivity functions
|
||||
|
||||
static int rails_math_ceil(int x, int y)
|
||||
inline int rails_math_ceil(int x, int y)
|
||||
{
|
||||
int temp;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* Strings -- draws string art.
|
||||
*
|
||||
* Last modified: 2019-08-29
|
||||
*/
|
||||
#include "tp_magic_api.h"
|
||||
#include "SDL_image.h"
|
||||
#include "SDL_mixer.h"
|
||||
|
|
@ -353,20 +358,9 @@ void string_draw_triangle_preview(magic_api * api, int which,
|
|||
SDL_Rect * update_rect)
|
||||
{
|
||||
int middle_x, middle_y;
|
||||
int w, h;
|
||||
|
||||
scale_coords(&ox, &oy, &x, &y);
|
||||
w = max(string_ox, x) - min(string_ox, x);
|
||||
h = max(string_oy, y) - min(string_oy, y);
|
||||
|
||||
/*
|
||||
This is enouth if you move the mouse slowly, but if you move the mouse fast,
|
||||
there are rests of old previews left around.
|
||||
update_rect->w=max(max(string_ox,x),max(ox,x))-min(min(string_ox,x),min(ox,x)) +80;
|
||||
update_rect->h=max(max(string_oy,y),max(oy,y))-min(min(string_oy,y),min(oy,y)) +80;
|
||||
update_rect->x=min(string_ox,x) -40;
|
||||
update_rect->y=min(string_oy,y) -40;
|
||||
*/
|
||||
update_rect->x = 0;
|
||||
update_rect->y = 0;
|
||||
update_rect->w = canvas->w;
|
||||
|
|
@ -387,13 +381,9 @@ void string_draw_angle_preview(magic_api * api, int which,
|
|||
int ox, __attribute__ ((unused))
|
||||
int oy, int x, int y, SDL_Rect * update_rect)
|
||||
{
|
||||
int w, h;
|
||||
int middle_x, middle_y;
|
||||
int dx, dy;
|
||||
|
||||
w = max(string_ox, x) - min(string_ox, x);
|
||||
h = max(string_oy, y) - min(string_oy, y);
|
||||
|
||||
update_rect->x = 0;
|
||||
update_rect->y = 0;
|
||||
update_rect->w = canvas->w;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
for Tux Paint
|
||||
|
||||
Mostly by Albert Cahalan <albert@users.sf.net>
|
||||
Copyright (c) 2002-2006
|
||||
Copyright (c) 2002-2019
|
||||
|
||||
http://www.newbreedsoftware.com/tuxpaint/
|
||||
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - December 30, 2017
|
||||
June 14, 2002 - September 12, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -127,3 +127,13 @@
|
|||
#undef CLOCK_ASM
|
||||
#define CLOCK_ASM(x) x=42
|
||||
#endif
|
||||
|
||||
/* h/t https://tutel.me/c/programming/questions/45349079/how+to+use+__attribute__fallthrough+correctly+in+gcc */
|
||||
#ifndef FALLTHROUGH
|
||||
#if defined(__GNUC__) && __GNUC__ >= 7
|
||||
#define FALL_THROUGH __attribute__ ((fallthrough))
|
||||
#else
|
||||
#define FALL_THROUGH ((void)0)
|
||||
#endif /* __GNUC__ >= 7 */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
170
src/fill.c
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
fill.c
|
||||
|
||||
Fill tool
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
Flood fill code based on Wikipedia example:
|
||||
http://www.wikipedia.org/wiki/Flood_fill/C_example
|
||||
by Damian Yerrick - http://www.wikipedia.org/wiki/Damian_Yerrick
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: September 14, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "fill.h"
|
||||
#include "rgblinear.h"
|
||||
#include "playsound.h"
|
||||
#include "pixels.h"
|
||||
|
||||
|
||||
/* Local function prototypes: */
|
||||
|
||||
int colors_close(SDL_Surface * canvas, Uint32 c1, Uint32 c2);
|
||||
|
||||
|
||||
int colors_close(SDL_Surface * canvas, Uint32 c1, Uint32 c2)
|
||||
{
|
||||
Uint8 r1, g1, b1, r2, g2, b2;
|
||||
|
||||
if (c1 == c2)
|
||||
{
|
||||
/* Get it over with quick, if possible! */
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
double r, g, b;
|
||||
|
||||
SDL_GetRGB(c1, canvas->format, &r1, &g1, &b1);
|
||||
SDL_GetRGB(c2, canvas->format, &r2, &g2, &b2);
|
||||
|
||||
// use distance in linear RGB space
|
||||
r = sRGB_to_linear_table[r1] - sRGB_to_linear_table[r2];
|
||||
r *= r;
|
||||
g = sRGB_to_linear_table[g1] - sRGB_to_linear_table[g2];
|
||||
g *= g;
|
||||
b = sRGB_to_linear_table[b1] - sRGB_to_linear_table[b2];
|
||||
b *= b;
|
||||
|
||||
// easy to confuse:
|
||||
// dark grey, brown, purple
|
||||
// light grey, tan
|
||||
// red, orange
|
||||
return r + g + b < 0.04;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int would_flood_fill(SDL_Surface * canvas, Uint32 cur_colr, Uint32 old_colr)
|
||||
{
|
||||
if (cur_colr == old_colr || colors_close(canvas, cur_colr, old_colr))
|
||||
{
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
void do_flood_fill(SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr, int * x1, int * y1, int * x2, int * y2)
|
||||
{
|
||||
int fillL, fillR, i, in_line;
|
||||
static unsigned char prog_anim;
|
||||
|
||||
|
||||
if (cur_colr == old_colr || colors_close(canvas, cur_colr, old_colr))
|
||||
return;
|
||||
|
||||
if (y < *y1)
|
||||
{
|
||||
*y1 = y;
|
||||
}
|
||||
if (y > *y2)
|
||||
{
|
||||
*y2 = y;
|
||||
}
|
||||
|
||||
|
||||
fillL = x;
|
||||
fillR = x;
|
||||
|
||||
prog_anim++;
|
||||
if ((prog_anim % 4) == 0)
|
||||
{
|
||||
/* FIXME: api->update_progress_bar(); */
|
||||
playsound(canvas, 1, SND_FILL, 1, x, SNDDIST_NEAR);
|
||||
}
|
||||
|
||||
|
||||
/* Find left side, filling along the way */
|
||||
|
||||
in_line = 1;
|
||||
|
||||
while (in_line)
|
||||
{
|
||||
putpixels[canvas->format->BytesPerPixel] (canvas, fillL, y, cur_colr);
|
||||
fillL--;
|
||||
|
||||
in_line = (fillL < 0) ? 0 : colors_close(canvas, getpixels[canvas->format->BytesPerPixel] (canvas, fillL, y), old_colr);
|
||||
}
|
||||
|
||||
if (fillL < *x1)
|
||||
{
|
||||
*x1 = fillL;
|
||||
}
|
||||
|
||||
fillL++;
|
||||
|
||||
/* Find right side, filling along the way */
|
||||
|
||||
in_line = 1;
|
||||
while (in_line)
|
||||
{
|
||||
putpixels[canvas->format->BytesPerPixel] (canvas, fillR, y, cur_colr);
|
||||
fillR++;
|
||||
|
||||
in_line = (fillR >= canvas->w) ? 0 : colors_close(canvas, getpixels[canvas->format->BytesPerPixel] (canvas, fillR, y), old_colr);
|
||||
}
|
||||
|
||||
if (fillR > *x2)
|
||||
{
|
||||
*x2 = fillR;
|
||||
}
|
||||
|
||||
fillR--;
|
||||
|
||||
|
||||
/* Search top and bottom */
|
||||
|
||||
for (i = fillL; i <= fillR; i++)
|
||||
{
|
||||
if (y > 0 && colors_close(canvas, getpixels[canvas->format->BytesPerPixel] (canvas, i, y - 1), old_colr))
|
||||
do_flood_fill(canvas, i, y - 1, cur_colr, old_colr, x1, y1, x2, y2);
|
||||
|
||||
if (y < canvas->h && colors_close(canvas, getpixels[canvas->format->BytesPerPixel] (canvas, i, y + 1), old_colr))
|
||||
do_flood_fill(canvas, i, y + 1, cur_colr, old_colr, x1, y1, x2, y2);
|
||||
}
|
||||
}
|
||||
|
||||
38
src/fill.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
fill.h
|
||||
|
||||
Fill tool
|
||||
Tux Paint - A simple drawing program for children.
|
||||
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others; see AUTHORS.txt
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
Flood fill code based on Wikipedia example:
|
||||
http://www.wikipedia.org/wiki/Flood_fill/C_example
|
||||
by Damian Yerrick - http://www.wikipedia.org/wiki/Damian_Yerrick
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: September 14, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
int would_flood_fill(SDL_Surface * canvas, Uint32 cur_colr, Uint32 old_colr);
|
||||
void do_flood_fill(SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr, int * x1, int * y1, int * x2, int * y2);
|
||||
|
||||
|
|
@ -972,10 +972,12 @@ static void loadfonts(SDL_Surface * screen, SDL_Texture * texture, SDL_Renderer
|
|||
|
||||
result = find_directory(B_SYSTEM_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
loadfonts(screen, texture, renderer, buffer);
|
||||
result = find_directory(B_COMMON_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
result = find_directory(B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
loadfonts(screen, texture, renderer, buffer);
|
||||
result = find_directory(B_USER_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
loadfonts(screen, texture, renderer, buffer);
|
||||
result = find_directory(B_USER_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
loadfonts(screen, texture, renderer, buffer);
|
||||
#elif defined(__APPLE__)
|
||||
loadfonts(screen, texture, renderer, "/System/Library/Fonts");
|
||||
loadfonts(screen, texture, renderer, "/Library/Fonts");
|
||||
|
|
|
|||
22
src/i18n.c
|
|
@ -4,7 +4,7 @@
|
|||
For Tux Paint
|
||||
Language-related functions
|
||||
|
||||
Copyright (c) 2002-2014 by Bill Kendrick and others
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$Id$
|
||||
|
||||
June 14, 2002 - December 11, 2016
|
||||
June 14, 2002 - August 29, 2019
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -1010,9 +1010,10 @@ static int set_current_language(const char *restrict locale_choice) MUST_CHECK;
|
|||
static int set_current_language(const char *restrict loc)
|
||||
{
|
||||
int i;
|
||||
int y_nudge = 0;
|
||||
int j = 0;
|
||||
char *oldloc;
|
||||
char *env_language;
|
||||
char *env_language_lang;
|
||||
|
||||
|
||||
if (strlen(loc) > 0)
|
||||
|
|
@ -1107,8 +1108,6 @@ static int set_current_language(const char *restrict loc)
|
|||
mysetenv("LANGUAGE", "C");
|
||||
}
|
||||
env_language = strdup(getenv("LANGUAGE"));
|
||||
int j = 0;
|
||||
char *env_language_lang;
|
||||
|
||||
if (*env_language)
|
||||
{
|
||||
|
|
@ -1128,7 +1127,6 @@ static int set_current_language(const char *restrict loc)
|
|||
if (lang_y_nudge[i][0] == langint)
|
||||
{
|
||||
wished_langs[j].lang_y_nudge = lang_y_nudge[i][1];
|
||||
//printf("y_nudge = %d\n", y_nudge);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1154,18 +1152,6 @@ static int set_current_language(const char *restrict loc)
|
|||
need_right_to_left = wished_langs[0].need_right_to_left;
|
||||
need_right_to_left_word = wished_langs[0].need_right_to_left_word;
|
||||
|
||||
#if 0
|
||||
for (i = 0; lang_y_nudge[i][0] != -1; i++)
|
||||
{
|
||||
// printf("lang_y_nudge[%d][0] = %d\n", i, lang_y_nudge[i][0]);
|
||||
if (lang_y_nudge[i][0] == langint)
|
||||
{
|
||||
y_nudge = lang_y_nudge[i][1];
|
||||
//printf("y_nudge = %d\n", y_nudge);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "DEBUG: Language is %s (%d) %s/%s\n",
|
||||
lang_prefix, langint, need_right_to_left ? "(RTL)" : "", need_right_to_left_word ? "(RTL words)" : "");
|
||||
|
|
|
|||
21
src/im.c
|
|
@ -2,7 +2,7 @@
|
|||
im.c
|
||||
|
||||
Input method handling
|
||||
Copyright (c)2007 by Mark K. Kim and others
|
||||
Copyright (c) 2007-2019 by Mark K. Kim and others
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -48,7 +48,6 @@
|
|||
#include "android_mbstowcs.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* ***************************************************************************
|
||||
* I18N GETTEXT
|
||||
*/
|
||||
|
|
@ -941,12 +940,12 @@ static int im_event_zh_tw(IM_DATA * im, SDL_Event event)
|
|||
|
||||
case IM_REQ_FREE: /* Free allocated resources */
|
||||
charmap_free(&cm);
|
||||
/* go onto full reset */
|
||||
FALL_THROUGH; /* go onto full reset */
|
||||
|
||||
case IM_REQ_RESET_FULL: /* Full reset */
|
||||
cm.section = SEC_ENGLISH;
|
||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||
/* go onto soft reset */
|
||||
FALL_THROUGH; /* go onto soft reset */
|
||||
|
||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||
im->s[0] = L'\0';
|
||||
|
|
@ -1164,12 +1163,12 @@ static int im_event_th(IM_DATA * im, SDL_Event event)
|
|||
|
||||
case IM_REQ_FREE: /* Free allocated resources */
|
||||
charmap_free(&cm);
|
||||
/* go onto full reset */
|
||||
FALL_THROUGH; /* go onto full reset */
|
||||
|
||||
case IM_REQ_RESET_FULL: /* Full reset */
|
||||
cm.section = SEC_ENGLISH;
|
||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||
/* go onto soft reset */
|
||||
FALL_THROUGH; /* go onto soft reset */
|
||||
|
||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||
im->s[0] = L'\0';
|
||||
|
|
@ -1384,12 +1383,12 @@ static int im_event_ja(IM_DATA * im, SDL_Event event)
|
|||
|
||||
case IM_REQ_FREE: /* Free allocated resources */
|
||||
charmap_free(&cm);
|
||||
/* go onto full reset */
|
||||
FALL_THROUGH; /* go onto full reset */
|
||||
|
||||
case IM_REQ_RESET_FULL: /* Full reset */
|
||||
cm.section = SEC_ENGLISH;
|
||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||
/* go onto soft reset */
|
||||
FALL_THROUGH; /* go onto soft reset */
|
||||
|
||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||
im->s[0] = L'\0';
|
||||
|
|
@ -1634,12 +1633,12 @@ static int im_event_ko(IM_DATA * im, SDL_Event event)
|
|||
|
||||
case IM_REQ_FREE: /* Free allocated resources */
|
||||
charmap_free(&cm);
|
||||
/* go onto full reset */
|
||||
FALL_THROUGH; /* go onto full reset */
|
||||
|
||||
case IM_REQ_RESET_FULL: /* Full reset */
|
||||
cm.section = SEC_ENGLISH;
|
||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||
/* go onto soft reset */
|
||||
FALL_THROUGH; /* go onto soft reset */
|
||||
|
||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||
im->s[0] = L'\0';
|
||||
|
|
@ -1724,7 +1723,7 @@ static int im_event_ko(IM_DATA * im, SDL_Event event)
|
|||
im->redraw--;
|
||||
event.text.text[0] = L'\0';
|
||||
}
|
||||
/* continue processing: */
|
||||
FALL_THROUGH; /* continue processing: */
|
||||
|
||||
/* Actual character processing */
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
/*
|
||||
* FIXME
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "macos.h"
|
||||
|
||||
#define MACOS_FONTS_PATH "%s/Library/Fonts"
|
||||
|
|
@ -12,7 +14,7 @@
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
const char *macos_fontsPath()
|
||||
const char *macos_fontsPath(void)
|
||||
{
|
||||
static char *p = NULL;
|
||||
|
||||
|
|
@ -35,7 +37,7 @@ const char *macos_fontsPath()
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
const char *macos_preferencesPath()
|
||||
const char *macos_preferencesPath(void)
|
||||
{
|
||||
static char *p = NULL;
|
||||
|
||||
|
|
@ -58,7 +60,7 @@ const char *macos_preferencesPath()
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
const char *macos_globalPreferencesPath()
|
||||
const char *macos_globalPreferencesPath(void)
|
||||
{
|
||||
return MACOS_GLOBAL_PREFERENCES_PATH;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef __MACOS_H__
|
||||
#define __MACOS_H__
|
||||
|
||||
const char *macos_fontsPath();
|
||||
const char *macos_preferencesPath();
|
||||
const char *macos_globalPreferencesPath();
|
||||
const char *macos_fontsPath(void);
|
||||
const char *macos_preferencesPath(void);
|
||||
const char *macos_globalPreferencesPath(void);
|
||||
|
||||
|
||||
#endif /* __MACOS_H__ */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.\" tuxpaint.1 - 2018.09.24
|
||||
.TH TUXPAINT 1 "24 September 2018" "0.9.23c" "Tux Paint"
|
||||
.\" tuxpaint.1 - 2019.09.21
|
||||
.TH TUXPAINT 1 "21 September 2019" "0.9.24" "Tux Paint"
|
||||
.SH NAME
|
||||
tuxpaint -- "Tux Paint", a drawing program for young children.
|
||||
|
||||
|
|
@ -23,6 +23,8 @@ tuxpaint -- "Tux Paint", a drawing program for young children.
|
|||
.br
|
||||
[\-\-nosound]
|
||||
.br
|
||||
[\-\-nostereo]
|
||||
.br
|
||||
[\-\-noquit]
|
||||
.br
|
||||
[\-\-noprint]
|
||||
|
|
@ -61,6 +63,8 @@ tuxpaint -- "Tux Paint", a drawing program for young children.
|
|||
.br
|
||||
[\-\-nolabel]
|
||||
.br
|
||||
[\-\-newcolorslast]
|
||||
.br
|
||||
[\-\-mirrorstamps]
|
||||
.br
|
||||
[\-\-mouse-accessibility]
|
||||
|
|
@ -151,6 +155,8 @@ tuxpaint -- "Tux Paint", a drawing program for young children.
|
|||
.br
|
||||
[\-\-sound]
|
||||
.br
|
||||
[\-\-stereo]
|
||||
.br
|
||||
[\-\-quit]
|
||||
.br
|
||||
[\-\-print]
|
||||
|
|
@ -187,6 +193,8 @@ tuxpaint -- "Tux Paint", a drawing program for young children.
|
|||
.br
|
||||
[\-\-label]
|
||||
.br
|
||||
[\-\-newcolorsfirst]
|
||||
.br
|
||||
[\-\-dontmirrorstamps]
|
||||
.br
|
||||
[\-\-stampsize=default]
|
||||
|
|
@ -273,7 +281,7 @@ orientations are both supported. (Also see \-\-orient, below.)
|
|||
|
||||
.TP 8
|
||||
.B \-\-orient=landscape \-\-orient=portrait
|
||||
If \-\-orient=portraitis set, asks \fITux Paint\fP to swap the WIDTH and HEIGHT
|
||||
If \-\-orient=portrait is set, asks \fITux Paint\fP to swap the WIDTH and HEIGHT
|
||||
values it uses for windowed or fullscreen mode, without having to actually
|
||||
change the WIDTH and HEIGHT values in the configuration file or on the
|
||||
command-line. (This is useful on devices where the screen can be rotated,
|
||||
|
|
@ -283,6 +291,10 @@ e.g. tablet PCs.)
|
|||
.B \-\-nosound \-\-sound
|
||||
Disable or enable (default) sound.
|
||||
|
||||
.TP 8
|
||||
.B \-\-nostereo \-\-stereo
|
||||
Disable or enable (default) stereo panning support.
|
||||
|
||||
.TP 8
|
||||
.B \-\-noquit \-\-quit
|
||||
Disable or enable (default) the on-screen \fIQuit\fP button and \fIEscape\fP
|
||||
|
|
@ -408,6 +420,11 @@ controllable.)
|
|||
Disable or enable (default) the \fILabel\fP tool, which lets you create
|
||||
text which can be altered or moved later.
|
||||
|
||||
.TP 8
|
||||
.B \-\-newcolorslast \-\-newcolorsfirst
|
||||
List solid (blank) colors at the end, or beginning (default) of the
|
||||
options displayed when using the \fINew\fP tool to start a new picture.
|
||||
|
||||
.TP 8
|
||||
.B \-\-mirrorstamps \-\-dontmirrorstamps
|
||||
With \fImirrorstamps\fP set, stamps which can be mirrored will appear
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ static struct osk_layout *load_layout(on_screen_keyboard * keyboard, char *layou
|
|||
char *filename;
|
||||
char *key, *value;
|
||||
osk_layout *layout;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
layout = malloc(sizeof(osk_layout));
|
||||
layout->name = NULL;
|
||||
|
|
@ -205,7 +206,7 @@ static struct osk_layout *load_layout(on_screen_keyboard * keyboard, char *layou
|
|||
|
||||
while (!feof(fi))
|
||||
{
|
||||
fgets(line, 1023, fi);
|
||||
tmp_ptr = fgets(line, 1023, fi);
|
||||
|
||||
if (is_blank_or_comment(line))
|
||||
continue;
|
||||
|
|
@ -277,6 +278,7 @@ void load_hlayout(osk_layout * layout, char *hlayout_name)
|
|||
char *key, *fontpath;
|
||||
char *plain_label, *top_label, *altgr_label, *shift_altgr_label;
|
||||
FILE *fi;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
key_number = line_number = 0;
|
||||
width = height = 0;
|
||||
|
|
@ -342,7 +344,7 @@ void load_hlayout(osk_layout * layout, char *hlayout_name)
|
|||
allocated = 1;
|
||||
}
|
||||
|
||||
fgets(line, 1023, fi);
|
||||
tmp_ptr = fgets(line, 1023, fi);
|
||||
|
||||
if (is_blank_or_comment(line))
|
||||
continue;
|
||||
|
|
@ -466,6 +468,7 @@ void load_keymap(osk_layout * layout, char *keymap_name)
|
|||
char *ksname1, *ksname2, *ksname3, *ksname4;
|
||||
char *line;
|
||||
FILE *fi;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
filename = malloc(sizeof(char) * 255);
|
||||
|
||||
|
|
@ -502,7 +505,7 @@ void load_keymap(osk_layout * layout, char *keymap_name)
|
|||
|
||||
while (!feof(fi))
|
||||
{
|
||||
fgets(line, 1023, fi);
|
||||
tmp_ptr = fgets(line, 1023, fi);
|
||||
|
||||
if (is_blank_or_comment(line))
|
||||
continue;
|
||||
|
|
@ -652,6 +655,7 @@ static void load_composemap(osk_layout * layout, char *composemap_name)
|
|||
char **pointer;
|
||||
char *line;
|
||||
FILE *fi;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
pointer = malloc(sizeof(wchar_t *));
|
||||
filename = malloc(sizeof(char) * 255);
|
||||
|
|
@ -684,7 +688,7 @@ static void load_composemap(osk_layout * layout, char *composemap_name)
|
|||
|
||||
while (!feof(fi))
|
||||
{
|
||||
fgets(line, 1023, fi);
|
||||
tmp_ptr = fgets(line, 1023, fi);
|
||||
|
||||
if (is_blank_or_comment(line))
|
||||
continue;
|
||||
|
|
@ -760,6 +764,7 @@ static void load_keysymdefs(osk_layout * layout, char *keysymdefs_name)
|
|||
char *filename;
|
||||
char *line;
|
||||
FILE *fi;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
filename = malloc(sizeof(char) * 255);
|
||||
|
||||
|
|
@ -789,7 +794,7 @@ static void load_keysymdefs(osk_layout * layout, char *keysymdefs_name)
|
|||
|
||||
while (!feof(fi))
|
||||
{
|
||||
fgets(line, 1023, fi);
|
||||
tmp_ptr = fgets(line, 1023, fi);
|
||||
if (strncmp("#define XK_", line, 11) != 0)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@ struct cfg
|
|||
#define NEGBOOL(x) (void*)(offsetof(struct cfginfo,x)|NEG)
|
||||
#define IMM(x) imm_##x
|
||||
|
||||
/* Prototypes of what's in tuxpaint.c: */
|
||||
void show_version(int details);
|
||||
void show_usage(int exitcode);
|
||||
|
||||
static void imm_version(void)
|
||||
{
|
||||
show_version(0);
|
||||
|
|
@ -142,6 +146,7 @@ shortcuts, NEGBOOL(noshortcuts)
|
|||
showcursor, NEGBOOL(hide_cursor)
|
||||
simpleshapes, POSBOOL(simple_shapes)
|
||||
sound, POSBOOL(use_sound)
|
||||
stereo, POSBOOL(use_stereo)
|
||||
stampcontrols, NEGBOOL(disable_stamp_controls)
|
||||
stamps, NEGBOOL(dont_load_stamps)
|
||||
stampsize, MULTI(stamp_size_override)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ struct cfginfo
|
|||
const char *start_blank;
|
||||
const char *use_print_config;
|
||||
const char *use_sound;
|
||||
const char *use_stereo;
|
||||
const char *wheely;
|
||||
const char *mouseaccessibility;
|
||||
const char *onscreen_keyboard;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
playsound.c
|
||||
|
||||
Copyright (c) 2002-2009
|
||||
Copyright (c) 2002-2019
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -31,6 +31,7 @@ Mix_Chunk *sounds[NUM_SOUNDS];
|
|||
|
||||
int mute;
|
||||
int use_sound = 1;
|
||||
int use_stereo = 1;
|
||||
static int old_sound[4] = { -1, -1, -1, -1 };
|
||||
|
||||
/**
|
||||
|
|
@ -80,22 +81,31 @@ void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y
|
|||
dist = (255 * ((screen->h - 1) - y)) / (screen->h - 1);
|
||||
}
|
||||
|
||||
if (x == SNDPOS_LEFT)
|
||||
left = 255 - dist;
|
||||
else if (x == SNDPOS_CENTER)
|
||||
left = (255 - dist) / 2;
|
||||
else if (x == SNDPOS_RIGHT)
|
||||
left = 0;
|
||||
|
||||
if (use_stereo)
|
||||
{
|
||||
if (x == SNDPOS_LEFT)
|
||||
left = 255 - dist;
|
||||
else if (x == SNDPOS_CENTER)
|
||||
left = (255 - dist) / 2;
|
||||
else if (x == SNDPOS_RIGHT)
|
||||
left = 0;
|
||||
else
|
||||
{
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x >= screen->w)
|
||||
x = screen->w - 1;
|
||||
|
||||
left = ((255 - dist) * ((screen->w - 1) - x)) / (screen->w - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x >= screen->w)
|
||||
x = screen->w - 1;
|
||||
|
||||
left = ((255 - dist) * ((screen->w - 1) - x)) / (screen->w - 1);
|
||||
/* Stereo disabled; treat everything like a SNDPOS_CENTER
|
||||
(equal amount in each of the left/right channels) */
|
||||
left = (255 - dist) / 2;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Panning of sound #%d in channel %d, left=%d, right=%d\n", s, chan, left, (255 - dist) - left);
|
||||
fflush(stdout);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* playsound.h
|
||||
|
||||
Copyright (c) 2002-2009
|
||||
Copyright (c) 2002-2019
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
#define SNDDIST_NEAR -999
|
||||
|
||||
extern Mix_Chunk *sounds[NUM_SOUNDS];
|
||||
extern int mute, use_sound;
|
||||
extern int mute, use_sound, use_stereo;
|
||||
|
||||
void playsound(SDL_Surface * screen, int chan, int s, int override, int x, int y);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
For Tux Paint
|
||||
List of sound effects.
|
||||
|
||||
Copyright (c) 2002-2007 by Bill Kendrick and others
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 15, 2002 - July 5, 2007
|
||||
June 15, 2002 - September 12, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -67,6 +67,7 @@ enum
|
|||
SND_TUXOK, /* "Ok" */
|
||||
SND_THICK,
|
||||
SND_THIN,
|
||||
SND_FILL,
|
||||
NUM_SOUNDS
|
||||
};
|
||||
|
||||
|
|
@ -107,7 +108,8 @@ static const char *sound_fnames[NUM_SOUNDS] = {
|
|||
DATA_PREFIX "sounds/youcannot.wav",
|
||||
DATA_PREFIX "sounds/tuxok.wav",
|
||||
DATA_PREFIX "sounds/thick.wav",
|
||||
DATA_PREFIX "sounds/thin.wav"
|
||||
DATA_PREFIX "sounds/thin.wav",
|
||||
DATA_PREFIX "sounds/fill.wav"
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
16
src/tools.h
|
|
@ -19,11 +19,11 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Copyright (c) 2002-2009 by Bill Kendrick
|
||||
Copyright (c) 2002-2019 by Bill Kendrick
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
June 14, 2002 - October 9, 2009
|
||||
June 14, 2002 - September 12, 2019
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ enum
|
|||
TOOL_SHAPES,
|
||||
TOOL_TEXT,
|
||||
TOOL_LABEL,
|
||||
TOOL_NA,
|
||||
TOOL_FILL,
|
||||
TOOL_MAGIC,
|
||||
TOOL_UNDO,
|
||||
TOOL_REDO,
|
||||
|
|
@ -76,8 +76,8 @@ const char *const tool_names[NUM_TOOLS] = {
|
|||
// Label tool
|
||||
gettext_noop("Label"),
|
||||
|
||||
// Reserved...
|
||||
" ",
|
||||
// Fill tool
|
||||
gettext_noop("Fill"),
|
||||
|
||||
// "Magic" effects tools (blur, flip image, etc.)
|
||||
gettext_noop("Magic"),
|
||||
|
|
@ -132,8 +132,8 @@ const char *const tool_tips[NUM_TOOLS] = {
|
|||
gettext_noop
|
||||
("Choose a style of text. Click on your drawing and you can start typing. Press [Enter] or [Tab] to complete the text. By using the selector button and clicking an existing label, you can move it, edit it and change its text style."),
|
||||
|
||||
// Reserved...
|
||||
" ",
|
||||
// Fill tool instructions
|
||||
gettext_noop("Click in the picture to fill that area with color."),
|
||||
|
||||
// Magic tool instruction
|
||||
gettext_noop("Pick a magical effect to use on your drawing!"),
|
||||
|
|
@ -185,7 +185,7 @@ const char *const tool_img_fnames[NUM_TOOLS] = {
|
|||
DATA_PREFIX "images/tools/shapes.png",
|
||||
DATA_PREFIX "images/tools/text.png",
|
||||
DATA_PREFIX "images/tools/label.png",
|
||||
DATA_PREFIX "images/ui/dead40x40.png",
|
||||
DATA_PREFIX "images/tools/fill.png",
|
||||
DATA_PREFIX "images/tools/magic.png",
|
||||
DATA_PREFIX "images/tools/undo.png",
|
||||
DATA_PREFIX "images/tools/redo.png",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ _tuxpaint()
|
|||
--orient=landscape --orient=portrait \
|
||||
-b --startblank --startlast \
|
||||
--sound -q --nosound \
|
||||
--stereo --nostereo \
|
||||
-x --noquit --quit
|
||||
-p --print --noprint \
|
||||
--complexshapes -s --simpleshapes \
|
||||
|
|
|
|||
147
src/tuxpaint.c
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - April 3, 2019
|
||||
June 14, 2002 - September 21, 2019
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -478,9 +478,7 @@ static void mtw(wchar_t * wtok, char *tok)
|
|||
#else
|
||||
|
||||
#include <librsvg/rsvg.h>
|
||||
#include <librsvg/rsvg-cairo.h>
|
||||
/* #include "rsvg.h" */
|
||||
/* #include "rsvg-cairo.h" */
|
||||
|
||||
#if !defined(RSVG_H) || !defined(RSVG_CAIRO_H)
|
||||
#error "---------------------------------------------------"
|
||||
#error "If you installed libRSVG from packages, be sure"
|
||||
|
|
@ -527,6 +525,8 @@ static void mtw(wchar_t * wtok, char *tok)
|
|||
#include "tip_tux.h"
|
||||
#include "great.h"
|
||||
|
||||
#include "fill.h"
|
||||
|
||||
#include "im.h"
|
||||
|
||||
|
||||
|
|
@ -2144,17 +2144,19 @@ static char *debug_gettext(const char *str);
|
|||
static int charsize(Uint16 c);
|
||||
#endif
|
||||
|
||||
static SDL_Surface *load_kpx(char *file);
|
||||
static SDL_Surface *load_kpx(const char *file);
|
||||
|
||||
#ifndef NOSVG
|
||||
static SDL_Surface *load_svg(char *file);
|
||||
static SDL_Surface *load_svg(const char *file);
|
||||
static float pick_best_scape(unsigned int orig_w, unsigned int orig_h, unsigned int max_w, unsigned int max_h);
|
||||
#endif
|
||||
static SDL_Surface *myIMG_Load_RWops(char *file);
|
||||
static SDL_Surface *myIMG_Load(char *file);
|
||||
static SDL_Surface *myIMG_Load_RWops(const char *file);
|
||||
static SDL_Surface *myIMG_Load(const char *file);
|
||||
static int trash(char *path);
|
||||
int file_exists(char *path);
|
||||
|
||||
int generate_fontconfig_cache_spinner(SDL_Surface * screen);
|
||||
|
||||
|
||||
#define MAX_UTF8_CHAR_LENGTH 6
|
||||
|
||||
|
|
@ -3263,6 +3265,12 @@ static void mainloop(void)
|
|||
draw_brushes();
|
||||
draw_colors(COLORSEL_ENABLE);
|
||||
}
|
||||
else if (cur_tool == TOOL_FILL)
|
||||
{
|
||||
keybd_flag = 0;
|
||||
draw_none();
|
||||
draw_colors(COLORSEL_ENABLE);
|
||||
}
|
||||
else if (cur_tool == TOOL_SHAPES)
|
||||
{
|
||||
keybd_flag = 0;
|
||||
|
|
@ -4606,6 +4614,35 @@ static void mainloop(void)
|
|||
if (mouseaccessibility)
|
||||
emulate_button_pressed = !emulate_button_pressed;
|
||||
}
|
||||
else if (cur_tool == TOOL_FILL)
|
||||
{
|
||||
Uint32 draw_color, canv_color;
|
||||
|
||||
/* Fill */
|
||||
|
||||
draw_color = SDL_MapRGB(canvas->format,
|
||||
color_hexes[cur_color][0],
|
||||
color_hexes[cur_color][1],
|
||||
color_hexes[cur_color][2]);
|
||||
canv_color = getpixels[canvas->format->BytesPerPixel] (canvas, old_x, old_y);
|
||||
|
||||
if (would_flood_fill(canvas, draw_color, canv_color))
|
||||
{
|
||||
/* We only bother recording an undo buffer
|
||||
(which may kill our redos) if we're about
|
||||
to actually change the picture */
|
||||
int x1, y1, x2, y2;
|
||||
|
||||
rec_undo_buffer();
|
||||
|
||||
x1 = x2 = old_x;
|
||||
y1 = y2 = old_y;
|
||||
|
||||
do_flood_fill(canvas, old_x, old_y, draw_color, canv_color, &x1, &y1, &x2, &y2);
|
||||
|
||||
update_canvas(x1, y1, x2, y2);
|
||||
}
|
||||
}
|
||||
else if (cur_tool == TOOL_TEXT || cur_tool == TOOL_LABEL)
|
||||
{
|
||||
if (onscreen_keyboard && !kbd)
|
||||
|
|
@ -4807,7 +4844,8 @@ static void mainloop(void)
|
|||
|
||||
if (cur_tool == TOOL_BRUSH || cur_tool == TOOL_STAMP ||
|
||||
cur_tool == TOOL_SHAPES || cur_tool == TOOL_LINES ||
|
||||
cur_tool == TOOL_MAGIC || cur_tool == TOOL_TEXT || cur_tool == TOOL_ERASER || cur_tool == TOOL_LABEL)
|
||||
cur_tool == TOOL_MAGIC || cur_tool == TOOL_TEXT ||
|
||||
cur_tool == TOOL_ERASER || cur_tool == TOOL_LABEL)
|
||||
{
|
||||
|
||||
/* Left tools scroll */
|
||||
|
|
@ -5424,7 +5462,7 @@ static void mainloop(void)
|
|||
do_setcursor(cursor_brush);
|
||||
else if (cur_tool == TOOL_STAMP)
|
||||
do_setcursor(cursor_tiny);
|
||||
else if (cur_tool == TOOL_LINES)
|
||||
else if (cur_tool == TOOL_LINES || cur_tool == TOOL_FILL)
|
||||
do_setcursor(cursor_crosshair);
|
||||
else if (cur_tool == TOOL_SHAPES)
|
||||
{
|
||||
|
|
@ -5455,7 +5493,6 @@ static void mainloop(void)
|
|||
do_setcursor(cursor_arrow);
|
||||
}
|
||||
}
|
||||
|
||||
else if (cur_tool == TOOL_MAGIC)
|
||||
do_setcursor(cursor_wand);
|
||||
else if (cur_tool == TOOL_ERASER)
|
||||
|
|
@ -6706,6 +6743,7 @@ void show_usage(int exitcode)
|
|||
" [--orient=landscape | --orient=portrait]\n"
|
||||
" [--disablescreensaver | --allowscreensaver ]\n"
|
||||
" [--sound | --nosound]\n"
|
||||
" [--stereo | --nostereo]\n"
|
||||
" [--colorfile FILE]\n"
|
||||
"\n"
|
||||
" Mouse/Keyboard:\n"
|
||||
|
|
@ -8036,7 +8074,7 @@ static int generate_fontconfig_cache_real(void)
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
static int generate_fontconfig_cache(void *vp)
|
||||
static int generate_fontconfig_cache(__attribute__((unused)) void *vp)
|
||||
{
|
||||
return generate_fontconfig_cache_real();
|
||||
}
|
||||
|
|
@ -9648,13 +9686,6 @@ static SDL_Surface *thumbnail2(SDL_Surface * src, int max_x, int max_y, int keep
|
|||
for (x = 0; x < max_x; x++)
|
||||
{
|
||||
#ifndef LOW_QUALITY_THUMBNAILS
|
||||
|
||||
#ifdef GAMMA_CORRECTED_THUMBNAILS
|
||||
/* per: http://www.4p8.com/eric.brasseur/gamma.html */
|
||||
float gamma = 2.2;
|
||||
float gamma_invert = 1.0 / gamma;
|
||||
#endif
|
||||
|
||||
tr = 0;
|
||||
tg = 0;
|
||||
tb = 0;
|
||||
|
|
@ -9669,9 +9700,8 @@ static SDL_Surface *thumbnail2(SDL_Surface * src, int max_x, int max_y, int keep
|
|||
SDL_GetRGBA(getpixel(src, src_x, src_y), src->format, &r, &g, &b, &a);
|
||||
|
||||
#ifdef GAMMA_CORRECTED_THUMBNAILS
|
||||
// tr = tr + pow((float)r, gamma);
|
||||
// tb = tb + pow((float)b, gamma);
|
||||
// tg = tg + pow((float)g, gamma);
|
||||
/* per: http://www.4p8.com/eric.brasseur/gamma.html */
|
||||
|
||||
tr = tr + sRGB_to_linear_table[r];
|
||||
tg = tg + sRGB_to_linear_table[g];
|
||||
tb = tb + sRGB_to_linear_table[b];
|
||||
|
|
@ -9694,9 +9724,6 @@ static SDL_Surface *thumbnail2(SDL_Surface * src, int max_x, int max_y, int keep
|
|||
ta = ta / tmp;
|
||||
|
||||
#ifdef GAMMA_CORRECTED_THUMBNAILS
|
||||
// tr = ceil(pow(tr, gamma_invert));
|
||||
// tg = ceil(pow(tg, gamma_invert));
|
||||
// tb = ceil(pow(tb, gamma_invert));
|
||||
tr = linear_to_sRGB(tr);
|
||||
tg = linear_to_sRGB(tg);
|
||||
tb = linear_to_sRGB(tb);
|
||||
|
|
@ -10425,11 +10452,6 @@ static void reset_avail_tools(void)
|
|||
tool_avail[TOOL_LABEL] = 0;
|
||||
|
||||
|
||||
/* TBD... */
|
||||
|
||||
tool_avail[TOOL_NA] = 0;
|
||||
|
||||
|
||||
/* Disable save? */
|
||||
|
||||
if (disable_save)
|
||||
|
|
@ -11593,7 +11615,8 @@ static void load_starter_id(char *saved_id, FILE * fil)
|
|||
char fname[FILENAME_MAX];
|
||||
FILE *fi;
|
||||
char color_tag;
|
||||
int r, g, b, tmp;
|
||||
int r, g, b, __attribute__((unused))tmp;
|
||||
char * __attribute__((unused)) tmp_ptr;
|
||||
|
||||
rname = NULL;
|
||||
|
||||
|
|
@ -11651,7 +11674,7 @@ static void load_starter_id(char *saved_id, FILE * fil)
|
|||
|
||||
if (!feof(fi) && color_tag == 'T')
|
||||
{
|
||||
tmp = fgets(template_id, sizeof(template_id), fi);
|
||||
tmp_ptr = fgets(template_id, sizeof(template_id), fi);
|
||||
template_id[strlen(template_id) - 1] = '\0';
|
||||
tmp = fscanf(fi, "%d", &template_personal);
|
||||
/* FIXME: Debug only? */
|
||||
|
|
@ -11679,12 +11702,12 @@ static void load_starter_id(char *saved_id, FILE * fil)
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
static SDL_Surface *load_starter_helper(char *path_and_basename, char *extension, SDL_Surface * (*load_func) (char *))
|
||||
static SDL_Surface *load_starter_helper(char *path_and_basename, const char *extension, SDL_Surface * (*load_func) (const char *))
|
||||
{
|
||||
char *ext;
|
||||
char fname[256];
|
||||
SDL_Surface *surf;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
ext = strdup(extension);
|
||||
snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext);
|
||||
|
|
@ -12249,7 +12272,7 @@ static int do_prompt_image_flash_snd(const char *const text,
|
|||
int i;
|
||||
SDL_Surface *alpha_surf;
|
||||
#endif
|
||||
int img1_w, img2_w, img3_w, max_img_w, img_x, img_y, offset;
|
||||
int img1_w, img2_w, img3_w, max_img_w, img_y, offset;
|
||||
SDL_Surface *img1b;
|
||||
int free_img1b;
|
||||
int txt_left, txt_right, img_left, btn_left, txt_btn_left, txt_btn_right;
|
||||
|
|
@ -12432,7 +12455,6 @@ static int do_prompt_image_flash_snd(const char *const text,
|
|||
|
||||
/* Draw the images (if any, and if not animated): */
|
||||
|
||||
img_x = img_left;
|
||||
img_y = 100 + PROMPTOFFSETY + 4;
|
||||
|
||||
if (img1b != NULL)
|
||||
|
|
@ -13619,9 +13641,9 @@ static void set_chunk_data(unsigned char **chunk_data, size_t * chunk_data_len,
|
|||
|
||||
strcat(headers, "Tuxpaint\n");
|
||||
strcat(headers, "Tuxpaint_" VER_VERSION "\n");
|
||||
sprintf(line, "%d%s", uncompressed_size, "\n");
|
||||
sprintf(line, "%lu%s", uncompressed_size, "\n");
|
||||
strcat(headers, line);
|
||||
sprintf(line, "%d%s", dataLen, "\n");
|
||||
sprintf(line, "%lu%s", dataLen, "\n");
|
||||
strcat(headers, line);
|
||||
|
||||
headersLen = strlen(headers);
|
||||
|
|
@ -13696,7 +13718,9 @@ static void do_png_embed_data(png_structp png_ptr)
|
|||
/* Starter foreground */
|
||||
if (img_starter)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Saving starter... %d\n", (int)(intptr_t) img_starter); //EP added (intptr_t) to avoid warning on x64
|
||||
#endif
|
||||
sbk_pixs = malloc(img_starter->h * img_starter->w * 4);
|
||||
compressedLen = compressBound(img_starter->h * img_starter->w * 4);
|
||||
|
||||
|
|
@ -17922,7 +17946,7 @@ static int paintsound(int size)
|
|||
/* Old libcairo1, svg and svg-cairo based code
|
||||
Based on cairo-demo/sdl/main.c from Cairo (GPL'd, (c) 2004 Eric Windisch):
|
||||
*/
|
||||
static SDL_Surface *load_svg(char *file)
|
||||
static SDL_Surface *load_svg(const char *file)
|
||||
{
|
||||
svg_cairo_t *scr;
|
||||
int bpp, btpp, stride;
|
||||
|
|
@ -18081,7 +18105,7 @@ static SDL_Surface *load_svg(char *file)
|
|||
* FIXME
|
||||
*/
|
||||
/* New libcairo2, rsvg and rsvg-cairo based code */
|
||||
static SDL_Surface *load_svg(char *file)
|
||||
static SDL_Surface *load_svg(const char *file)
|
||||
{
|
||||
cairo_surface_t *cairo_surf;
|
||||
cairo_t *cr;
|
||||
|
|
@ -18332,7 +18356,7 @@ static float pick_best_scape(unsigned int orig_w, unsigned int orig_h, unsigned
|
|||
*/
|
||||
/* FIXME: we can remove this after SDL folks fix their bug at http://bugzilla.libsdl.org/show_bug.cgi?id=1485 */
|
||||
/* Try to load an image with IMG_Load(), if it fails, then try with RWops() */
|
||||
static SDL_Surface *myIMG_Load_RWops(char *file)
|
||||
static SDL_Surface *myIMG_Load_RWops(const char *file)
|
||||
{
|
||||
SDL_Surface *surf;
|
||||
FILE *fi;
|
||||
|
|
@ -18366,7 +18390,7 @@ static SDL_Surface *myIMG_Load_RWops(char *file)
|
|||
if we notice it's an SVG file (if available!);
|
||||
call load_kpx() if we notice it's a KPX file (JPEG with wrapper);
|
||||
otherwise call SDL_Image lib's IMG_Load() (for PNGs, JPEGs, BMPs, etc.) */
|
||||
static SDL_Surface *myIMG_Load(char *file)
|
||||
static SDL_Surface *myIMG_Load(const char *file)
|
||||
{
|
||||
if (strlen(file) > 4 && strcasecmp(file + strlen(file) - 4, ".kpx") == 0)
|
||||
{
|
||||
|
|
@ -18387,7 +18411,7 @@ static SDL_Surface *myIMG_Load(char *file)
|
|||
/**
|
||||
* FIXME
|
||||
*/
|
||||
static SDL_Surface *load_kpx(char *file)
|
||||
static SDL_Surface *load_kpx(const char *file)
|
||||
{
|
||||
SDL_RWops *data;
|
||||
FILE *fi;
|
||||
|
|
@ -19000,7 +19024,15 @@ static void magic_playsound(Mix_Chunk * snd, int left_right, int up_down)
|
|||
else if (left_right > 255)
|
||||
left_right = 255;
|
||||
|
||||
left = ((255 - dist) * (255 - left_right)) / 255;
|
||||
if (use_stereo)
|
||||
{
|
||||
left = ((255 - dist) * (255 - left_right)) / 255;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Stereo disabled; no panning (see playsound.c) */
|
||||
left = (255 - dist) / 2;
|
||||
}
|
||||
|
||||
Mix_SetPanning(0, left, (255 - dist) - left);
|
||||
#endif
|
||||
|
|
@ -19243,7 +19275,8 @@ static int do_new_dialog(void)
|
|||
/* Support legacy BMP files for load: */
|
||||
|| strcasestr(f->d_name, ".bmp") != NULL
|
||||
/* Support for KPX (Kid Pix templates; just a JPEG with resource fork header): */
|
||||
|| strcasestr(f->d_name, ".kpx") != NULL || strcasestr(f->d_name, ".jpg") != NULL
|
||||
|| strcasestr(f->d_name, ".kpx") != NULL
|
||||
|| strcasestr(f->d_name, ".jpg") != NULL
|
||||
#ifndef NOSVG
|
||||
|| strcasestr(f->d_name, ".svg") != NULL
|
||||
#endif
|
||||
|
|
@ -19366,11 +19399,12 @@ static int do_new_dialog(void)
|
|||
{
|
||||
/* No thumbnail - load original: */
|
||||
|
||||
/* Make sure we have a ~/.tuxpaint/saved directory: */
|
||||
if (make_directory("saved", "Can't create user data directory"))
|
||||
/* Make sure we have a ~/.tuxpaint/[starters|templates] directory: */
|
||||
if (make_directory(dirname[d_places[num_files]], "Can't create user data directory"))
|
||||
{
|
||||
/* (Make sure we have a .../saved/.thumbs/ directory:) */
|
||||
make_directory("saved/.thumbs", "Can't create user data thumbnail directory");
|
||||
/* (Make sure we have a .../[starters|templates]/.thumbs/ directory:) */
|
||||
snprintf(fname, sizeof(fname), "%s/.thumbs", dirname[d_places[num_files]]);
|
||||
make_directory(fname, "Can't create user data thumbnail directory");
|
||||
}
|
||||
|
||||
img = NULL;
|
||||
|
|
@ -19382,8 +19416,6 @@ static int do_new_dialog(void)
|
|||
If it exists, it should give a better idea of what the
|
||||
starter looks like, compared to the overlay image... */
|
||||
|
||||
/* FIXME: Add .jpg support -bjk 2007.03.22 */
|
||||
|
||||
/* (Try JPEG first) */
|
||||
snprintf(fname, sizeof(fname), "%s/%s-back",
|
||||
dirname[d_places[num_files]], d_names[num_files]);
|
||||
|
|
@ -19524,9 +19556,9 @@ static int do_new_dialog(void)
|
|||
|
||||
#ifdef DEBUG
|
||||
printf("%d files and colors were found!\n", num_files);
|
||||
#endif
|
||||
printf("first_color = %d\nfirst_starter = %d\nfirst_template = %d\nnum_files = %d\n\n", first_color, first_starter,
|
||||
first_template, num_files);
|
||||
#endif
|
||||
|
||||
|
||||
/* Let user choose a color or image: */
|
||||
|
|
@ -20309,7 +20341,8 @@ static int do_color_sel(void)
|
|||
int i, dx, dy;
|
||||
int done, chose;
|
||||
int back_left, back_top;
|
||||
int color_sel_x, color_sel_y;
|
||||
int color_sel_x = 0, color_sel_y = 0;
|
||||
int want_animated_popups = 1;
|
||||
SDL_Surface *tmp_btn_up, *tmp_btn_down;
|
||||
|
||||
Uint32(*getpixel_tmp_btn_up) (SDL_Surface *, int, int);
|
||||
|
|
@ -20330,7 +20363,6 @@ static int do_color_sel(void)
|
|||
|
||||
/* FIXME this is the first step to make animated popups optional,
|
||||
to be removed from here when implemented in a more general way */
|
||||
int want_animated_popups = 1;
|
||||
|
||||
hide_blinking_cursor();
|
||||
|
||||
|
|
@ -21626,7 +21658,7 @@ static void render_all_nodes_starting_at(struct label_node **node)
|
|||
* FIXME
|
||||
*/
|
||||
/* FIXME: This should search for the top-down of the overlaping labels and only re-render from it */
|
||||
static void derender_node(struct label_node **ref_head)
|
||||
static void derender_node(__attribute__((unused)) struct label_node **ref_head)
|
||||
{
|
||||
SDL_Rect r_tmp_derender;
|
||||
|
||||
|
|
@ -22958,7 +22990,7 @@ static void setup_config(char *argv[])
|
|||
char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
status_t result;
|
||||
|
||||
result = find_directory(B_USER_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
result = find_directory(B_USER_SETTINGS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
asprintf((char **)&savedir, "%s/%s", buffer, "TuxPaint");
|
||||
#elif __APPLE__
|
||||
savedir = strdup(macos.preferencesPath());
|
||||
|
|
@ -23086,6 +23118,7 @@ static void setup_config(char *argv[])
|
|||
SETBOOL(start_blank);
|
||||
SETBOOL(use_print_config);
|
||||
SETBOOL(use_sound);
|
||||
SETBOOL(use_stereo);
|
||||
SETBOOL(wheely);
|
||||
SETBOOL(mouseaccessibility);
|
||||
SETBOOL(onscreen_keyboard);
|
||||
|
|
@ -23409,7 +23442,7 @@ static void setup_config(char *argv[])
|
|||
{
|
||||
char *token;
|
||||
|
||||
token = strtok(tmpcfg.joystick_buttons_ignore, ",");
|
||||
token = strtok((char *) tmpcfg.joystick_buttons_ignore, ",");
|
||||
while (token != NULL)
|
||||
{
|
||||
if (strtof(token, NULL) < 0 || strtof(token, NULL) > 254)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# http://www.tuxpaint.org/
|
||||
#
|
||||
# Default distribution version last modified:
|
||||
# April 30, 2012
|
||||
# September 21, 2019
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
|
@ -76,6 +76,13 @@
|
|||
# sound=yes
|
||||
|
||||
|
||||
### Disable stereo sound (only use mono)?
|
||||
### -------------------------------------
|
||||
#
|
||||
# nostereo=yes
|
||||
# stereo=yes
|
||||
|
||||
|
||||
### Disable the on-screen 'Quit' button in the toolbar?
|
||||
### ---------------------------------------------------
|
||||
### Note: Pressing the [Escape] key,
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 179 KiB |
BIN
starters/jigsaw_3x3.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
starters/jigsaw_5x5.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 47 KiB |