Finish rebranding of Krita as Chalk

git-svn-id: svn:// 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tpearson 13 years ago
parent 2785103a6b
commit 698569f842

@ -61,7 +61,7 @@ INPUT = example \
koshell \
kplato \
kpresenter \
krita \
chalk \
kspread kugar kword lib

@ -25,7 +25,7 @@ The applications currently included in KOffice are:
Flowcharting program
- Kexi
Integrated data management
- Krita
- Chalk
A pixel graphics tool
- KFormula
A mathematical formula editor

@ -18,7 +18,7 @@ in the 1.6 cycle:
- lib/kross
- kchart
- kexi
- krita
- chalk
- kdgantt
- kplato
- doc

@ -18,7 +18,7 @@ Table Of Contents
1. Database drivers (MySQL, PostgreSQL)
2. Development files
2.1. KexiDB development files
2.2. Krita development files
2.2. Chalk development files
3. Scripting support
4. Microsoft Access Import (optional, recommended)
5. Quick command-line tests of Kexi installation
@ -78,13 +78,13 @@ The files are:
The installation can be tested by building the MS Access import plugin
as described in the Microsoft Access import plugin section below.
2.2. Krita development files
2.2. Chalk development files
Location: koffice/krita/core, koffice/krita/sdk,
koffice/krita/kritacolor, koffice/krita/ui
Location: koffice/chalk/core, koffice/chalk/sdk,
koffice/chalk/chalkcolor, koffice/chalk/ui
These directories contain header files that are installed and can be
used by plugin developers to extend Krita with new tools, colorspaces,
used by plugin developers to extend Chalk with new tools, colorspaces,
paint-ops and more. If your distribution packages development files
separately, it may be a good idea to make a package with these headers.
@ -93,7 +93,7 @@ separately, it may be a good idea to make a package with these headers.
Preliminary support for Ruby and Python scripting is available for
Krita and Kexi.
Chalk and Kexi.
It can be disabled by passing the '--disable-scripting' option to
@ -131,15 +131,15 @@ For example, the Python scripting package may contain:
and the Ruby scripting package may contain:
4. Microsoft Access Import (optional, recommended)

@ -0,0 +1,20 @@
Adrian Page <>
Andrew Richards <>
Bart Coppens <>
Boudewijn Rempt <>
Carsten Pfeiffer <>
Casper Boemann <>
Cyrille Berger <>
Danny Allen <>
Dirk Schoenberger <>
Gábor Lehel <>
John Califf <>
Matthias Elter <>
Melchior Franz <>
Michael Koch <>
Michael Thaler <>
Patrick Julien <>
Roger Larsson <>
Sven Langkamp <>
Current maintainer: Boudewijn Rempt <>

@ -0,0 +1 @@
We really should use cvs2changelog or something like that...

@ -0,0 +1,93 @@
Since 1999, people have been hacking on Chalk. Everyone brought their
own coding style, their own code conventions, their own likes and
dislikes. Me, (Boudewijn that is), I like indents of four spaces, and
no scope prefixes for variables. However, in the interests of
consistency, these are the rules new code should adhere to:
With four spaces. Use the default Java indentation
style of (X)Emacs or KDevelop -- also for brace placement.
Avoid as much as possible #includes in header files; use forward declarations
of classes.
Avoid as much as possible initializers in the body of the constructor. Use
initializer lists instead.
Scope prefixes
Use only m_ for class-level variables. No other scope prefixes; no g_, l_,
no 'p' for pointer variables.
Shared pointers
Use shared pointers wherever possible.
Chalk doesn't use Qt's properties -- yet. If you want to introduce use of
properties, convert any and all classes in Chalk before committing.
Getter/setters are named 'x() for getters and setX(int x) for setters. If you
come across violations of this rule, change the code.
Class naming
If you use a well-known design pattern, name the class according to the design
pattern. All files should start with 'kis_', all classes with the 'Kis' prefix.
In filenames, separate words with an underscore; in classnames use capital letters.
Example: kis_new_class.h/KisNewClass.
The only exception to this rule are interfaces.
Example: kis_tool.h/KisToolInterface.
Function naming
Functions should be named in camelBackedFashion, to conform to Qt's standards.
If you encounter functions in c_style_like_this, feel free to rename. Also:
verbNoun -- i.e., rotateLayer, not layer_rotate. The latter is a true c-ism,
introduced by a language that needs to prefix the 'class' name to every function
in order to have something that not quite OO.
Variable/Parameter names
Variable/parameter names start with an undercast letter. A name composed of different
words is done in camelBackedStyle.
Chalk has started to use designer. All dialogs and all widgets that have a tqlayout
manager must be done in designer. We don't add code nor add signal/slot connections
in designer
All enums should be prefixed with 'enum'.
Currently, we only use anonymous (right term?) namespaces for things like undo
commands. For the rest, some classes have a 'Kis' prefix, others don't. This should
be made consistent, and we might want to use namespaces to keep all of Chalk
Files and classes
It's preferred (and strongly preferred) to have only one class per .h/.cpp file.
(Which is logical, because otherwise you won't be able to keep to the naming scheme.)
Keep the source airy and open. (However, maybe I was wrong in wanting spaces around ->...)
Slots and Q_SIGNALS
Prefix Q_SLOTS with slot and Q_SIGNALS with sig: slotUpdateSelection, sigSelectionUpdated.
Boudewijn Rempt

@ -0,0 +1,259 @@
WARNING: OBSOLETE (Chalk's internal code has become much better by now)
From time to time, people come up with the suggestion to use an
existing imaging library with Chalk, to replace our own core. This
file contains a list of all libraries known to me, and a short
Perhaps, one day, we will decide to either use an existing library, or
remodel our core after one of those. Of the libraries present, except
for our own Chalk, Vigra look like it's the best bet from a technical
point of view, with Vips a good runner-up.
* Chalk (
Chalk contains its own 2D image library, consisting of the tile
manager, the layer classes and KisPainter. We really should separate
this 2d lib from the interface code, and put it in a real lib with
a well-defined interface.
- Already works
- Optimized for interactive work
- Allows different colour models
- Uses GraphicsMagick or ImageMagick for loading and saving.
- Does not work well with different channel depths
- Not integrated with CMS
- TileManager complicated and slow for pixel reading and
* Gimp (
The Gimp contains a complex core that allows interactive painting of
images with a channel depth of 8 bits.
- Well tested, very complete
- Optimized for interactive usage
- Written in C.
- Not readily available as a library.
- Depends on glib and gtk
- 8-bit only
- No colour models
- Has problems handling really large images
* Vigra (
Vigra is a C++ imaging library written by Ullrich Koetthe to
demonstrate his Phd thesis on flexible image algorithms.
- Supports very large images
- Supports colour models
- Supports different bit depths through templating
- C++
- Relatively small
- Relatively well-documented
- License incompatible with GPL?
- Not optimized for interactive use
- Unsure about future development since this was a research
* Vips (
Vips is a C library with a C++ layer. It has been designed for
handling very large images, mainly in the context of research into
paintings in museums like the National Gallery. It comes with a gtk2
- Handles very large images
- Handles colour models
- Handles different bit depths
- C++ interface
- Not optimized for paintbox type apps (even though it is
- Very large.
* VXL (
VXL is a collection of small libraries that are used for compution
vision and imaging purposes in an academic setting.
- Handles very large images
- C++
- Not recently updated
- Comes with its own core libraries that replace standard C++
- Optimized for simple rgb images.
- No license at all
- Badly documented
* CImg (
CImg is a very cool, very small library that offers some extremely
innovative image effects, like inpainting of damaged or noise images.
- Small
- Cool stuff
- Everything, including GUI stuff, in one header file.
- badly documented.
* Gegl (
Gegl was intended to become the Gimp 2.0 core, but development had
stalled so much that the move to Gegl didn't happen before Gimp 2.0.
However, the Thawte millionaire whose name has escaped me, has
promised to support gegl development financially, freeing the
developer to work full-time on it. It is, more or less, an attempt to
write a templated library in C++ with the help of a custom language to
describe image operations.
- It's got money behind it
- Small
- Optimized for interactive use
- Not finished yet
- C
- Complex hack around the fact that C is a low-level language
* libart_lgpl (
Libart isn't really an image library, but rather a canvas that can be
used to paint images on. It is optimized for vector graphics, and is
used by Karbon to render tqshapes before display.
- Raph Levien is really good at this stuff, so libart is
- C
- It isn't an image library, really
* java2D (
Java2D is more or less complete library to write a paint app around.
It offers image types, colour spaces, kernel convolutions and text.
It's in Java, of course, and the free re-implementation is not done
yet, and besides, is based around Cairo.
- Neat OO design
- Complete
- Java
- Not free
- Has some legacy cruft.
* ImageMagick/GraphicsMagick (,
GraphicsMagick is ImageMagick with a different license, and a
focus on API stability. GM and IM now also differ slightly in terms of
features offered. Chalk used to be based around IM (which can still be
seen in many places in the code). The IM core was dropped in favour of
the present core because it turned out that IM was not re-entrant,
making it hard to use in an interactive application.
- Mature
- C++ interface
- Full-featured
- RGB and CMYK (but not more)
- License compatible with Chalk
- Under active development
- Bit-depth a compile-time option
- Not re-entrant: not optimized for interactive use.
* Paintlib2 (
A portable (windows/Linux) library for image loading, manipulation and
saving. The same kind of thing as IM/GM, but not quite as mature.
- No support for larger bit depths per channel
- Windows (bmp) centric
- Development seems to have stopped in 2000
* Antigrain (
Antigrain is a graphics lib that specializes in high-quality anti-aliasing. It can be
useful to mine for algorithms, but is mainly a library to render vector data to bitmaps,
just like libart or cairo.
- High quality algorithms
- Completely free license.
- Colour-space agnostic
- Not a complete 2D library
- self-admittedly complex and hard to use.
- No support for greater bit-depths.
* The Visualization Toolkit (VTK,
A very big C++ library for 2d and 3d image processing and visualisation. It's
too big to easily evaluate for me.
- It is used in other Qt applications, like Julius
- Probably very good
- The book is very expensive
- Uses its own make equivalent, CMake
- Very large
* Java Advanced Imaging

@ -0,0 +1,47 @@
## The common lib, shared between the part, the plugins, and the filters
libchalkcommon_la_SOURCES =
libchalkcommon_la_LDFLAGS = $(all_libraries) $(LIB_QT) -version-info 1:0 -no-undefined
libchalkcommon_la_LIBADD = sdk/ core/ ui/ chalkcolor/ $(LCMS_LIBS) $(LIB_KOFFICEUI) $(LIB_KOPAINTER) $(LIB_KOPALETTE) $(LIB_XINPUTEXT)
## The part
kde_module_LTLIBRARIES =
libchalkpart_la_SOURCES =
libchalkpart_la_LDFLAGS = $(all_libraries) $(LIB_QT) -L../lib/kofficecore/.libs/ -lkofficecore -L../lib/kofficeui/.libs/ -lkofficeui -L../lib/store/.libs/ -lkstore -L../chalk/ui/.libs -lchalkui -module $(KDE_PLUGIN)
libchalkpart_la_LIBADD =
## The kdeinit loadable module and executable
chalk_la_SOURCES =
chalk_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT)
xdg_apps_DATA = chalk.desktop
kdemimedir = $(kde_mimedir)/application
rcdir = $(kde_datadir)/chalk
rc_DATA = chalk.rc chalk_readonly.rc
SUBDIRS = sdk chalkcolor core ui . dtd colorspaces plugins data pics
# Needed to compile, which has no source files to itself
# but everything in static libs.
echo >
messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui` >> rc.cpp
$(EXTRACTRC) `find . -name \*.rc` >> rc.cpp
perl > i18ndata
$(XGETTEXT) i18ndata rc.cpp `find . -name \*.cc -o -name \*.h -o -name \*.cpp` ui/kis_aboutdata.h -o $(podir)/chalk.pot
rm -f i18ndata
DOXYGEN_EXCLUDE = CImg.h colorspaces plugins chalkcolor/colorspaces core/tiles
include $(top_srcdir)/admin/
kde_services_DATA = chalkpart.desktop

@ -0,0 +1,13 @@
Chalk is a paint application for bitmap images. It's also, according to
the Dictionary of Phrase and Fable:
The first of four Hindu periods contained in the great Yuga, when the
genius of Truth and Right, in the form of bull, stood firm on his four
feet, and man gained nothing by iniquity.
In the Mahabharata, the name 'chalk' is used in a context where this
can be translated with 'perfect' - the perfect age.
Chalk is Swedish for chalk (or pencil?) and rita means "to write".

@ -0,0 +1,181 @@
After 1.5 cleanups
* Move core/ui class private members to d-pointers
* Selections, adj. masks, wetness, heigh masks (all 8-bit mask ideas)
as sublayers to paint layers, and make them movable between layers
and x,y, toggle on/off.
* Fix KisFilter::colorSpaceIndependence/worksWith overlap
* Add api & gui to exclude channels from compositing
* Add a mechanism for cspaces to start long-running filters when a paintdev
is created -- and a gui to turn that on and off, perhaps something analogous
to a channels box
* Make set of filter categories extensible
* BUG 121975: selections and group layers.
* Add end poly entry to the popup menu when the poly tool is active (note:
make this more generically useful for tools. Great idea by David Herman
* Paint direct should be paint directly
UI stuff:
* color picker: top combo should be as wide as the whole widget; the widget is a bit too big,
we should try to make the listview a lot smaller. Maybe just use labels here?
* The edit palette dialog two-step should be changed into a single dialog
Code organization
Transform tool (CBR)
* Implement native integer versions for bell, bspline, lanczos3 and mitchell filters
* The option widget should be connected
* Figure out why scaling down produces sum of weights <255 (Hermite filter)
* Implement gui, create cursors and update visitor for shearing
* A chalk document embedded in KWord has the wrong scaling and transparency
* A chalk document embedded in another document prints at the wrong place
* Embedded KOffice objects don't paint themselves correctly
* There is currently no kimgio module for Chalk images: implement one by
saving a rendered png image into the chalk file and extracting that from
kimgio. (Saving of a png image in .kra files is done; now we just need to
add the kimgio file)
* There is no easy way to get back from editing an embedded document (if the image is larger
than the window)
Colorspace independence (found with the test colorstrategy)
* Check and double check the cms capabilities: especially the use of
profiles in the render/convert/edit paths.
* Merge grayscale layers back into one color image.
* The fill painter (and perhaps other paitners, too) should call addDirtyRect, and the floodfill
tool should use that rect to blit and notify the image, instead of notifying the complete image.s
* Fix image resolution handling (zooming, pixel-for-pixel, 100% == zoomed to dpi/xdpi etc.)
* Loading and saving of selections
* Anti-aliased filling (requires some simple colorspace function to merge 2 Pixels)
* Load/save configuration of everything user-settable.
* Long painter operations (e.g., convolution painter) should use the
progressbar and be cancelable.
* Color adjustment filters seem to have a problem with partially selected pixels
File Format:
* Save & load all annotations in .kra files
* Save & load more information, like PNG comments, gamma information, etc
* Fix gimp XCF PSD and import/export (ImageMagick hacking...)
* Fix imports to import metadata.
User Interface
* Add an explanatory textframe to the scaling filter combobox.
* Add a good crosshair cursor and a crosshair cursor that extends to the rulers.
* Add a cheatsheet widget that integrates with knewstuff to have tutorials that people
can download and follow from Chalk.
* Add opacity widget (One that grows more white or transparent (showing those gray blocks) based on the
* Add out-of-gamut selection
* Fix layout problems in tool option widgets.
* Disable dragging the toolbox from dock position to dock position (see Karbon)
* Disable all relevant actions when a layer is locked or invisible. See bug #90456. Show locked status of current layer in statusbar.
* Add link check to new image dialog to sync width and height
* The description field in color settings is empty
* Implement the following dialogs / widgets:
- Variations (#Boudewijn)
- Gradient: remove the autogradient dialog and make into a proper
gradient dialog, and allow saving gradients.
* Show which tool is associated with which pointer (mouse, stylus, eraser, other stylusses) In the statusbar.
* Allow guides to be disabled. Allow diagonal guides (useful for perspective drawings) Bug #108398
* Allow snapping to guides.
* Create templates for often-used image formats. Add save-as-template
* Add deselect with rmb -- maybe also selectable actions with other tools on rmb?
* Fix crop tool: when pressing shift, keep aspect ratio, implement gray mask.
(Michael Thaler)
* Allow shape tools to be filled with gradients
* Tabs in dockers drag-and-droppable (vector of docker
windows, create new docker if tab dropped outside existing
docker window)
* Add bird's eye view tab to dockers.
* Add action (macro) docker
* Add navigation/zoom docker
* Add history docker
* Doing a copy of a selection, but having the wrong layer selected gives
me an empty selection (all transparent). Pressing paste should say so
(popup) instead of creating a new useless layer.
* the selection tools should allow pressing shift to go to 'substract'
mode without adjusting the combobox for the current tool. (a different
pointer would be nice as well)
* Pressing save for the first time gives me the 'save document as' dialog
which is set to 'png' as default file format.
I suggest to set the default format (in the "save as" dialog) to the chalk
format for any image that has more then 1 layer.
* On shearing, the whole image is mirrored, not the selected
* Add opacity slider to selection painting tools so you can
select something 50%.
* Add an input profile combobox to the import image & scan dialogs
* Add an export profile combobox to the export image/print dialogs
* Add loading and saving of profiles associated with images in .chalk
* Export profiles in tiff, png and jpg (this and the previous item
depend on ImageMagick or GraphicsMagick supporting this in some way.)
* Support out-of-gamut warning indications for parts of an image
containing unprintable colours (no idea how to implement this). -> this
is pretty easy with lcms
* preferences dialog can show non-existent profile for the monitor profile -> confusing
* Zoom tool should zoom out when alt is pressed. Show zoom-minus cursor in that case
* Implement the following tools or paintops:
- fix airbrush tool (add rate option, add increase
of brush size if kept in one place)
- color changer, smudge tool,sharpen tool, blur
tool, dodge tool, burn tool, sponge tool (These
last are perhaps more generally: painting with
filters tool)
- stamp tool (paint with patttern/image selection) (#Cyrille)
- Text tool (use kotext with a transparent background here?)
- Measure tool
- calligraphic pen tool
* Pressure sensivitize all relevant tools (e.g. line tool)
* Add resize slider to freehand tools that resizes the mean brush size.
* Implement path tools (Michael Thaler?)
* Sumi-e brush tool
* Natural media tools (chalk, ink, oil, watercolour -- fun!)
* As many filters as possible :-)
* Add color models for HSV, YUV etc.
* Add Wet & Sticky model (in progress already)
* Implement Curtiss et. al. for watercolour (Levien, wet dreams. In progress)
* The composite ops in RGB -> composite.h do not take mask into account
- this goes for COPY and CLEAR in grayscale also
* No use of the resolution parameter (but the resolution dialog is still only a .ui file and not implemented at all)
* Use gutenprint or something better for image printing.

@ -0,0 +1,59 @@
Color palettes ;
You can drag a color from the preview swatches but it is changing the
selected one at click and since dropping drops on the selected one, the
concept of duplicating the foreground to the background by dragging is
impossible. I suggest to do selecting of foreground/background color on
mouse release instead.
<BSAR: I don't understand this at all -- not sure what you're talking about.>
When you did a 'select all' and then create a selection nothing happens
since you can't select more then you already did. For that reason I
suggest to make select all and deselect lead to a similar situation where
adding a selection or substracting one will be smart and do make the
result of that select or deselect visible. In either case selecting a
part in both a fully selected and fully deselected image should lead to
the same result.
<BSAR: not going to do this: in the next release, it will be
always clear whether there's a selection because we're going to show it as a
child layer. For now, determining whether the extent of a selection is as big
as the extent of a layer, and whether the whole selection is completely 100%
selected is going to be too expensive>
Thomas Zander
Missing tooltips (Carsten N.)
LEGEND: NTAA No Tooltip At All
Missing tooltips:
KComboBox in the toolbar (the with 'Pixel Brush' for example)
Overview-widget: NTAA
Histogram: No Tooltip. Well, there is nothing but the histogram, there should be at least something...
Context-Widgets of the tools:
Star: NTAA
Brush: NTAA
Line: NTAA
Rectangle: NTAA
Ellispse: NTAA
Polygone: NTAA
Polyline: NTAA
Duplicate Brush: NTAA

@ -0,0 +1,95 @@
[Desktop Entry]
Name[km]= Chalk
Exec=chalk %U
Comment=Edit and paint images
Comment[bg]=Редактиране и оцветяване на изображения
Comment[ca]=Edita i pinta imatges
Comment[da]=Redigér og mal billeder
Comment[de]=Bilder zeichnen und bearbeiten
Comment[el]=Επεξεργασία και ζωγραφική εικόνων
Comment[eo]=Redakti kaj pentri bildojn
Comment[es]=Editar y pintar imágenes
Comment[et]=Piltide töötlemine ja joonistamine
Comment[fa]=ویرایش و رنگ‌آمیزی تصاویر
Comment[fi]=Muokkaa ja maalaa kuvia
Comment[fr]=Création et retouche d'images
Comment[fy]=Ofbyldings bewurkje en skilderje
Comment[gl]=Edita e pinta imaxes
Comment[he]=עריכה וצביעת תמונות
Comment[hu]=Képek szerkesztése
Comment[it]=Modifica e disegna immagini
Comment[km]=កែសម្រួល និង​គូរ​រូបភាព
Comment[lv]=Labot un zīmēt attēlus
Comment[nb]=Rediger og mal bilder
Comment[nds]=Biller malen un bewerken
Comment[ne]=छविहरू सम्पादन र पेन्ट गर्नुहोस्
Comment[nl]=Afbeeldingen bewerken en schilderen
Comment[pl]=Edycja i tworzenie obrazków
Comment[pt]=Editar e pintar as imagens
Comment[pt_BR]=Editar e pintar as imagens
Comment[ru]=Растровые рисунки
Comment[se]=Doaimmat ja mále govaid
Comment[sk]=Editivať a maľovať obrázky
Comment[sl]=Urejajte in ustvarjajte slike
Comment[sr]=Уређујте и правите слике
Comment[sr@Latn]=Uređujte i pravite slike
Comment[sv]=Redigera och måla bilder
Comment[uk]=Створення і редагування зображень
Comment[uz]=Rasm bilan ishlash dasturi
Comment[uz@cyrillic]=Расм билан ишлаш дастури
GenericName=Painting and Image Editing
GenericName[bg]=Редактор на графични изображения
GenericName[ca]=Programa d'edició d'imatges
GenericName[da]=Maling & billedredigering
GenericName[de]=Mal- und Bildbearbeitungsprogramm
GenericName[el]=Επεξεργασία και ζωγραφική εικόνων
GenericName[eo]=Pentrado kaj Bildredaktado
GenericName[es]=Pintura y edición de imágenes
GenericName[et]=Joonistamine ja pilditöötlus
GenericName[fa]=رنگ‌آمیزی و ویرایش تصویر
GenericName[fi]=Maalaus ja kuvankäsittely
GenericName[fr]=Peinture et retouche d'images
GenericName[ga]=Péinteáil agus Eagarthóireacht Íomhánna
GenericName[gl]=Debuxo e Edición de Imaxes
GenericName[he]=טיפול ועריכת תמונות
GenericName[hu]=Rajzoló és képszerkesztő
GenericName[is]=Málun og myndsýsl
GenericName[it]=Disegno e modifica di immagini
GenericName[km]=គូរ​គំនូរ និង​កែសម្រួល​រូបភាព
GenericName[lv]=Zīmēšana un attēlu apstrāde
GenericName[nb]=Program for maling og bilderedigering
GenericName[nds]=Malen un Biller bewerken
GenericName[ne]=पेन्टिङ्ग र छवि सम्पादन
GenericName[pl]=Edycja zdjęć oraz rysunków
GenericName[pt]=Pintura e Manipulação de Imagens
GenericName[pt_BR]=Pintura e Edição de Imagens
GenericName[ru]=Растровые изображения
GenericName[se]=Málen- ja govvagieđaheapmi
GenericName[sk]=Program pre úpravu a maľovanie obrázkov
GenericName[sl]=Slikanje in urejanje slik
GenericName[sr]=Цртање и уређивање слика
GenericName[sr@Latn]=Crtanje i uređivanje slika
GenericName[sv]=Målning och bildredigering
GenericName[uk]=Малювання і редагування зображень
GenericName[uz]=Rasmlar bilan ishlaydigan dastur
GenericName[uz@cyrillic]=Расмлар билан ишлайдиган дастур

@ -0,0 +1,199 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="Chalk" version="15">
<Menu name="Edit"><text>&amp;Edit</text>
<Action name="koffice_undo"/>
<Action name="koffice_redo"/>
<Action name="cut"/>
<Action name="copy"/>
<Action name="copy_merged"/>
<Action name="paste"/>
<Action name="paste_new"/>
<Action name="clear"/>
<Action name="fill_selection_foreground_color"/>
<Action name="fill_selection_background_color"/>
<Action name="fill_selection_pattern"/>
<Action name="revert"/>
<Menu name="Resources"><text>&amp;Resources</text>
<Action name="add_palette"/>
<Action name="edit_palette"/>
<Menu name="View"><text>&amp;View</text>
<Action name="fullscreen"/>
<Action name="view_newview"/>
<ActionList name="view_closeallviews"/>
<ActionList name="view_split"/>
<Action name="zoom_in"/>
<Action name="zoom_out"/>
<Action name="actual_pixels"/>
<Action name="actual_size"/>
<Action name="fit_to_canvas"/>
<Action name="view_ruler"/>
<!--Action name="view_guidelines"/-->
<Action name="view_toggle_grid" />
<Menu name="view_fast_grid_config"><text>Grid Spacing</text>
<Action name="view_fast_grid_1x1" />
<Action name="view_fast_grid_2x2" />
<Action name="view_fast_grid_5x5" />
<Action name="view_fast_grid_10x10" />
<Action name="view_fast_grid_20x20" />
<Action name="view_fast_grid_40x40" />
<Action name="view_toggle_perspective_grid" />
<Action name="view_clear_perspective_grid" />
<Action name="view_palette_action_menu"/>
<Action name="refresh_canvas"/>
<Menu name="Image"><text>&amp;Image</text>
<Action name="img_properties"/>
<Action name="resizeimgtolayer"/>
<Action name="duplicate_image"/>
<Menu name="Layer"><text>&amp;Layer</text>
<Menu name="LayerNew"><text>New</text>
<Action name="insert_layer"/>
<Action name="insert_part_layer"/>
<Action name="insert_adjustment_layer"/>
<Action name="insert_image_as_layer"/>
<Action name="cut_selection_to_new_layer"/>
<Action name="copy_selection_to_new_layer"/>
<Action name="remove_layer"/>
<Action name="duplicate_layer"/>
<Action name="hide_layer"/>
<Action name="link_layer"/>
<Menu name="LayerNew"><text>Mask</text>
<Action name="create_mask"/>
<Action name="mask_fromsel"/>
<Action name="mask_tosel"/>
<Action name="apply_mask"/>
<Action name="remove_mask"/>
<Action name="edit_mask"/>
<Action name="show_mask"/>
<Action name="raiselayer"/>
<Action name="lowerlayer"/>
<Action name="toplayer"/>
<Action name="bottomlayer"/>
<Action name="resizelayertoowner"/>
<Action name="save_layer_as_image"/>
<Action name="layer_to_image"/>
<Action name="mirrorLayerX"/>
<Action name="mirrorLayerY"/>
<Action name="layer_properties"/>
<Action name="merge_layer"/>
<Action name="flatten_image"/>
<Menu name="Select"><text>Sele&amp;ct</text>
<Action name="select_all"/>
<Action name="deselect"/>
<Action name="reselect"/>
<Action name="invert"/>
<Action name="feather"/>
<Action name = "grow"/>
<Action name = "similar"/>
<Action name="toggle_display_selection"/>
<Menu name="Filter"><text>Filte&amp;r</text>
<Action name="filter_apply_again"/>
<Action name="adjust_filters"/>
<Action name="artistic_filters"/>
<Action name="blur_filters"/>
<Action name="color_filters"/>
<Action name="decor_filters"/>
<Action name="edge_filters"/>
<Action name="enhance_filters"/>
<Action name="emboss_filters"/>
<Action name="map_filters"/>
<Action name="nonphotorealistic_filters"/>
<Action name="misc_filters"/>
<Menu name="Tools"><text>&amp;Tools</text>
<Menu name="settings"><text>Settings</text>
<Separator group="settings_show"/>
<Action name="preferences" group="settings_configure"/>
<ToolBar name="edit_toolbar" position="top"><Text>Edit</Text>
<Action name="koffice_undo"/>
<Action name="koffice_redo"/>
<Action name="cut"/>
<Action name="copy"/>
<Action name="remove"/>
<Action name="scrap_selection"/>
<Action name="paste_special"/>
<ToolBar name="navigation" position="top"><Text>Navigation</Text>
<Action name="refresh_canvas"/>
<Action name="zoom_in"/>
<Action name="zoom_out"/>
<ToolBar name="ToolBox" position="left">
<ToolBar name="BrushesAndStuff" position="top">
<Text>Brushes and Stuff</Text>
<Action name="brushes"/>
<Action name="gradients"/>
<Action name="patterns"/>
<Action name="paintops"/>
<Action name="paintop_options"/>
<Menu name="image_popup">
<Action name="select_all"/>
<Action name="deselect"/>
<Action name="invert"/>
<Action name="duplicate_layer"/>
<Action name="koffice_undo"/>
<Action name="koffice_redo"/>
<Action name="cut"/>
<Action name="copy"/>
<Action name="paste"/>
<Action name="paste_new"/>

@ -0,0 +1,23 @@
* - part of Krayon
* Copyright (c) 1999 Matthias Elter <>
* 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
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ui/kis_factory.h"
K_EXPORT_COMPONENT_FACTORY( libchalkpart, KisFactory )

@ -0,0 +1,35 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="Chalk" version="1">
<Menu name="edit"><text>Edit</text>
<Action name="copy"/>
<Action name="select_all"/>
<Action name="select_none"/>
<Action name="flip_selection"/>
<Menu name="view"><text>View</text>
<Action name="zoom_in"/>
<Action name="zoom_out"/>
<Menu name="Layer"><text>Layer</text>
<Action name="hide_layer"/>
<Action name="previous_layer"/>
<Action name="next_layer"/>
<ToolBar name="edit" position="top"><Text>Edit</Text>
<Action name="copy"/>
<ToolBar name="navigation" position="top"><Text>Navigation</Text>
<Action name="zoom_in"/>
<Action name="zoom_out"/>

@ -0,0 +1,45 @@
# all_includes must remain last!
-I$(srcdir) \
-I$(srcdir)/../sdk \
-I$(srcdir)/colorspaces \
if have_openexr
libchalkcolor_la_SOURCES = \ kis_colorspace_iface.skel \ \ \ $(OPENEXR_SOURCES)
libchalkcolor_la_LDFLAGS = -version-info 1:0:0 -no-undefined $(all_libraries)
libchalkcolor_la_LIBADD = colorspaces/ $(LCMS_LIBS) $(LIB_KPARTS) $(LIB_KDECORE) $(LIB_QT) $(OPENEXR_LIBS)
include_HEADERS = \
kis_channelinfo.h \
kis_color.h \
kis_colorspace.h \
kis_composite_op.h \
kis_profile.h \
kis_histogram_producer.h \
kis_basic_histogram_producers.h kis_u8_base_colorspace.h kis_u16_base_colorspace.h kis_f16half_base_colorspace.h kis_f32_base_colorspace.h \
kis_colorspace_factory_registry.h kis_abstract_colorspace.h
if include_kunittest_tests
TESTSDIR = tests
SUBDIRS = colorspaces . $(TESTSDIR)
kde_servicetypes_DATA = chalk_colorspace.desktop

@ -0,0 +1,4 @@
The color library is a wrapper around lcms and provides colorspaces
that can do things to arrays of bytes that represent pixels. The
number of colorspaces is extensible with plugins. The colorspace
registry is responsible for loading the colorspace plugins.

@ -0,0 +1,11 @@
This library is still dependent upon chalk/sdk for some headers. This
should be changed. The headers concerned are:
Additionally, there is a problem with the histogram producers: those are
tied to the individual base colorspaces, but also need iterators, so they
are in core for the moment.

@ -0,0 +1,38 @@
[Desktop Entry]
Comment=A module implementing a complete colorspace for use with libchalkcolor
Comment[bg]=Модул, реализиращ пълна цветова гама за употреба с libchalkcolor
Comment[ca]=Un mòdul que implementa un complet espai de colors per a usar-lo amb libchalkcolor
Comment[cy]=Modiwl sy'n gweithredoli gofod lliw cyflawn i'w ddefnyddio efo libchalkcolor
Comment[da]=Et modul som implementerer et fuldstændigt farverum til brug med libchalkcolor
Comment[de]=Ein Modul, das einen kompletten Farbraum zur Benutzung mit libchalkcolor implementiert
Comment[el]=Ένα άρθρωμα που υλοποιεί έναν πλήρη χρωματικό χώρο για χρήση με το libchalkcolor
Comment[en_GB]=A module implementing a complete colourspace for use with libchalkcolor
Comment[es]=Un módulo que implementa un espacio de color completo para usar con libchalkcolor
Comment[et]=Täielikku värviruumi teostav moodul (teegile libchalkcolor)
Comment[fa]=پیمانه‌ای که فضای رنگ کاملی برای استفاده با libchalkcolor پیاده می‌کند
Comment[fr]=Un module implantant un espace de couleurs complet à utiliser avec libchalkcolor
Comment[fy]=In module dy in folslein kleurgebiet ymplementearret dat brûkt wurde kin mei libchalkcolor
Comment[gl]=Un módulo que implemente un espazo de cor completo para usar con libchalkcolor
Comment[hu]=Teljes színteret megvalósító modul a libchalkcolor programkönyvtárhoz
Comment[is]=Eining með fullu litasvæði til notkunar með libchalkcolor
Comment[it]=Un modulo che implementa uno spazio dei colori completo per usarlo con libchalkcolor
Comment[km]=ម៉ូឌុល​ដែល​អនុវត្ត​ប្រភេទ​ពណ៌​ពេញលេញ ដើម្បី​ប្រើ​ជាមួយ libchalkcolor
Comment[nb]=En modul som implementerer et komplett fargerom til bruk med libchalkcolor
Comment[nds]=En Moduul, dat en helen Klörenruum för den Bruuk mit libchalkcolor inbuut
Comment[ne]=लिबक्रितारङसँग प्रयोग गर्नका लागि सम्पूर्ण रङ खालीस्थानलाई मोड्युललाई औजार बनाइदै
Comment[nl]=Een module die een volledig kleurgebied implementeert dat gebruikt kan worden met libchalkcolor
Comment[pl]=Moduł implementujący kompletną przestrzeń barw do użytku z libchalkcolor
Comment[pt]=Um módulo que implementa um espaço de cores completo para usar com a 'libchalkcolor'
Comment[pt_BR]=Um módulo que implementa um espaço de cores completo para usar com a 'libchalkcolor'
Comment[ru]=Полная поддержка цветовых пространств в libchalkcolor
Comment[sk]=Modul ktorý poskytuje úplný farebný priestor pre použitie s libchalkcolor
Comment[sl]=Modul, v katerem je izveden celoten barvni prostor za uporabo z libchalkcolor
Comment[sr]=Модул који имплементира потпун простор боја за употребу са libchalkcolor
Comment[sr@Latn]=Modul koji implementira potpun prostor boja za upotrebu sa libchalkcolor
Comment[sv]=En modul som implementerar en fullständig färgrymd för användning med libchalkcolor
Comment[uk]=Модуль впровадження повного простору кольорів для вжитку з libchalkcolor
Comment[zh_TW]=實作完整色彩空間以使用 libchalkcolor 的模組

@ -0,0 +1,20 @@
INCLUDES = -I$(srcdir)/.. \
-I$(srcdir)/../../sdk \
libchalkcolorspaces_la_SOURCES = \ \
noinst_HEADERS = \
kis_alpha_colorspace.h \
libchalkcolorspaces_la_LIBADD = $(OPENEXR_LIBS)
libchalkcolorspaces_la_METASOURCES = AUTO

@ -0,0 +1,296 @@
* Copyright (c) 2004 Boudewijn Rempt <>
* 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
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <limits.h>
#include <stdlib.h>
#include <tqimage.h>
#include <kdebug.h>
#include <klocale.h>
#include <config.h>
#include LCMS_HEADER
#include "kis_alpha_colorspace.h"
#include "kis_u8_base_colorspace.h"
#include "kis_channelinfo.h"
#include "kis_id.h"
#include "kis_integer_maths.h"
namespace {
const TQ_UINT8 PIXEL_MASK = 0;
KisAlphaColorSpace::KisAlphaColorSpace(KisColorSpaceFactoryRegistry * tqparent,
KisProfile *p) :
KisU8BaseColorSpace(KisID("ALPHA", i18n("Alpha tqmask")), TYPE_GRAY_8, icSigGrayData, tqparent, p)
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 0, KisChannelInfo::ALPHA, KisChannelInfo::UINT8));
m_alphaPos = 0;
void KisAlphaColorSpace::fromTQColor(const TQColor& /*c*/, TQ_UINT8 *dst, KisProfile * /*profile*/)
void KisAlphaColorSpace::fromTQColor(const TQColor& /*c*/, TQ_UINT8 opacity, TQ_UINT8 *dst, KisProfile * /*profile*/)
dst[PIXEL_MASK] = opacity;
void KisAlphaColorSpace::getAlpha(const TQ_UINT8 *pixel, TQ_UINT8 *alpha) const
*alpha = *pixel;
void KisAlphaColorSpace::toTQColor(const TQ_UINT8 */*src*/, TQColor *c, KisProfile * /*profile*/)
c->setRgb(255, 255, 255);
void KisAlphaColorSpace::toTQColor(const TQ_UINT8 *src, TQColor *c, TQ_UINT8 *opacity, KisProfile * /*profile*/)
c->setRgb(255, 255, 255);
*opacity = src[PIXEL_MASK];
TQ_UINT8 KisAlphaColorSpace::difference(const TQ_UINT8 *src1, const TQ_UINT8 *src2)
// Arithmetic operands smaller than int are converted to int automatically
return TQABS(src2[PIXEL_MASK] - src1[PIXEL_MASK]);
void KisAlphaColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const
if (nColors > 0) {
TQ_UINT32 total = 0;
total += *colors[nColors] * weights[nColors];
*dst = total / 255;
TQValueVector<KisChannelInfo *> KisAlphaColorSpace::channels() const
return m_channels;
bool KisAlphaColorSpace::convertPixelsTo(const TQ_UINT8 *src,
TQ_UINT8 *dst, KisAbstractColorSpace * dstColorSpace,
TQ_UINT32 numPixels,
TQ_INT32 /*renderingIntent*/)
// No lcms trickery here, we are only a opacity channel
TQ_INT32 size = dstColorSpace->pixelSize();
TQ_UINT32 j = 0;
TQ_UINT32 i = 0;
while ( i < numPixels ) {
dstColorSpace->fromTQColor(TQt::red, OPACITY_OPAQUE - *(src + i), (dst + j));
i += 1;
j += size;
return true;
//XXX bitblt of ColorSpaceAlpha does not take tqmask into consideration as this is probably not
// used ever
void KisAlphaColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dststride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *srcAlphaMask,
TQ_INT32 tqmaskRowStride,
TQ_UINT8 opacity,
TQ_INT32 rows,
TQ_INT32 cols,
const KisCompositeOp& op)
TQ_UINT8 *d;
const TQ_UINT8 *s;
TQ_INT32 i;
TQ_INT32 linesize;
if (rows <= 0 || cols <= 0)
switch (op.op()) {
compositeCopy(dst, dststride, src, srcRowStride, srcAlphaMask, tqmaskRowStride, rows, cols, opacity);
linesize = sizeof(TQ_UINT8) * cols;
d = dst;
while (rows-- > 0) {
memset(d, OPACITY_TRANSPARENT, linesize);
d += dststride;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d ++, s ++) {
if (d[PIXEL_MASK] < s[PIXEL_MASK]) {
else {
dst += dststride;
src += srcRowStride;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d++, s++) {
if (d[PIXEL_MASK] <= s[PIXEL_MASK]) {
} else {
dst += dststride;
src += srcRowStride;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d++, s++) {
int srcAlpha = (s[PIXEL_MASK] * opacity + UINT8_MAX / 2) / UINT8_MAX;
if (srcAlpha > d[PIXEL_MASK])
d[PIXEL_MASK] = srcAlpha;
dst += dststride;
src += srcRowStride;
if (opacity != OPACITY_OPAQUE) {
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d++, s++) {
int srcAlpha = (s[PIXEL_MASK] * opacity + UINT8_MAX / 2) / UINT8_MAX;
d[PIXEL_MASK] = (d[PIXEL_MASK] * (UINT8_MAX - srcAlpha) + srcAlpha * UINT8_MAX + UINT8_MAX / 2) / UINT8_MAX;
dst += dststride;
src += srcRowStride;
else {
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d++, s++) {
memcpy(d, s, 1);
int srcAlpha = s[PIXEL_MASK];
d[PIXEL_MASK] = (d[PIXEL_MASK] * (UINT8_MAX - srcAlpha) + srcAlpha * UINT8_MAX + UINT8_MAX / 2) / UINT8_MAX;
dst += dststride;
src += srcRowStride;
KisCompositeOpList KisAlphaColorSpace::userVisiblecompositeOps() const
KisCompositeOpList list;
return list;
TQString KisAlphaColorSpace::channelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const
Q_ASSERT(channelIndex < nChannels());
TQ_UINT32 channelPosition = m_channels[channelIndex]->pos();
return TQString().setNum(pixel[channelPosition]);
TQString KisAlphaColorSpace::normalisedChannelValueText(const TQ_UINT8 *pixel, TQ_UINT32 channelIndex) const
Q_ASSERT(channelIndex < nChannels());
TQ_UINT32 channelPosition = m_channels[channelIndex]->pos();
return TQString().