Commit 5dffcc3c authored by Boudewijn Rempt's avatar Boudewijn Rempt

Added HACKING file with 'coding standards' -- still needs some editing,

began porting tabbar to Ariya's koffice lib tabbar (the tabbar is broken
now, but it was already broken, too), started work on adding some more
painting properties like spacing to resources, started work on re-adding
tool dialogs, extended new layer dialog to include more useful options,
added composition op choice to layers -- like Gimp's layer effects, took
composition ops out of the main colour strategy file and started porting
a few more of GraphicsMagick's composite ops to Krita and removed some
obsolete files. Oh, and made sure that one image can consist of layers
of more than one image type.

svn path=/trunk/koffice/; revision=283681
parent a8a28cb3
Since 1999, people have been hacking on Krita. 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:
Indentation
With real tabs, each tab eight spaces. Use the default Linux indentation
style of (X)Emacs or KDevelop -- also for brace placement.
Includes
Avoid as much as possible #includes in header files; use forward declarations
of classes.
Initializers
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.
Getter/setter
Krita doesn't use Qt's properties -- yet. If you want to introduce use of
properties, convert any and all classes in Krita before committing.
Getter/setters are named 'getX() for getters and x(int x) for setters. If you
come across violations of this rule, change the code.
Note that this does not hold for dialogs: getter in dialogs
have no 'get' prefix. I guess.
Class naming
If you use a well-known design pattern, name the class according to the design
pattern.
Designer
Krita doesn't use .ui files. Yet. When we get down to the great UI redesign,
all dialogs should be done in Designer.
Enums
All enums should be prefixed with 'enum'.
Namespaces
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 Krita
inside.
\ No newline at end of file
* The tabs for images inside a document seem to be broken :-(
* The custom cursor show up in a white block if not run using a graphics card with hardware cursors.
* The tabs for images inside a document seem to be broken :-( -- use Aditya's new common tabbar when it's done
* Brush cursor shapes for tools (updating cursors from the tools doesn't work yet).
* Give each layer its own imagetype; allow layers of diverse types in one image. Add layer composition choice
* Give each layer its own imagetype; allow layers of diverse types in one image.
* Option dialog for tools
* Make tools kparts
* Fix scrollbars
......
......@@ -5,7 +5,7 @@ INCLUDES = -I$(srcdir)/builder/ -I$(srcdir)/visitors/ -I$(srcdir)/helper/ -I$(s
noinst_LTLIBRARIES = libkiscore.la
libkiscore_la_LIBADD = tiles/libkistile.la helper/libkishelper.la builder/libkiscorebuilder.la strategy/libkisstrategy.la color_strategy/libkiscolor_strategy.la
libkiscore_la_SOURCES = kis_paint_device.cc kis_layer.cc kis_channel.cc kis_mask.cc kis_image.cc kis_doc.cc kis_view.cc kis_factory.cc kis_pluginserver.cc kis_resourceserver.cc kis_brush.cc kis_pattern.cc kis_nameserver.cc kis_painter.cc kis_tool_factory.cc kis_cursor.cc kis_selection.cc kis_command.cc kis_background.cc kis_global.cc kis_config.cc kis_tool.cc kis_resource.cc kis_resource_mediator.cc kis_guide.cc kis_memento_originator.cc kis_canvas_subject.cc kis_canvas_controller.cc kis_canvas_observer.cc kis_tool_controller.cc kis_tile_command.cc kis_alpha_mask.cc kis_imagepipe_brush.cc
libkiscore_la_SOURCES = kis_paint_device.cc kis_layer.cc kis_channel.cc kis_mask.cc kis_image.cc kis_doc.cc kis_view.cc kis_factory.cc kis_pluginserver.cc kis_resourceserver.cc kis_brush.cc kis_pattern.cc kis_nameserver.cc kis_painter.cc kis_tool_factory.cc kis_cursor.cc kis_selection.cc kis_command.cc kis_background.cc kis_global.cc kis_config.cc kis_tool.cc kis_resource.cc kis_resource_mediator.cc kis_guide.cc kis_memento_originator.cc kis_canvas_subject.cc kis_canvas_controller.cc kis_canvas_observer.cc kis_tool_controller.cc kis_tile_command.cc kis_alpha_mask.cc kis_imagepipe_brush.cc kis_gradient.cc
libkiscore_la_METASOURCES = AUTO
libkiscore_la_LDFLAGS = $(KDE_RPATH)
......
/*
* Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
*
* 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.
*
All compositing code except for the 'OVER' operator is derived from
GraphicsMagick/magick/composite.c and is subject to the following
license and copyright:
Copyright (C) 2002 GraphicsMagick Group, an organization dedicated
to making software imaging solutions freely available.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
("GraphicsMagick"), to deal in GraphicsMagick without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of GraphicsMagick,
and to permit persons to whom GraphicsMagick is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of GraphicsMagick.
The software is provided "as is", without warranty of any kind, express
or implied, including but not limited to the warranties of
merchantability, fitness for a particular purpose and noninfringement.
In no event shall GraphicsMagick Group be liable for any claim,
damages or other liability, whether in an action of contract, tort or
otherwise, arising from, out of or in connection with GraphicsMagick
or the use or other dealings in GraphicsMagick.
Except as contained in this notice, the name of the GraphicsMagick
Group shall not be used in advertising or otherwise to promote the
sale, use or other dealings in GraphicsMagick without prior written
authorization from the GraphicsMagick Group.
*/
#if !defined COMPOSITE_H_
#define COMPOSITE_H_
#include <kdebug.h>
#include <kis_global.h>
/**
* Image composition functions that can be used by the colour strategies.
*
* XXX: perhaps each composition function ought to be a strategy of itself.
* Krita is still missing something like a capabilities database that ties
* together image formats, colour systems, composition functions etc., that
* determines which goes with which and defines user visible text for all this.
*
* For now, this is a quick hack; once things are working again, I'll investigate
* doing this nicely (famous last words...)
*
* XXX: Except for Over, none of the operators uses the opacity parameter
*/
// XXX: This is Over composite op from GraphicsMagick -- the original one, from Krita is still used.
void compositeOverXXX(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
QUANTUM *d;
QUANTUM *s;
Q_INT32 i;
double MaxRGB_alpha, MaxRGB_beta, alpha;
if (opacity == OPACITY_TRANSPARENT)
return;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
alpha = s[PIXEL_ALPHA];
MaxRGB_alpha = QUANTUM_MAX - alpha;
MaxRGB_beta = QUANTUM_MAX - (QUANTUM_MAX - d[PIXEL_ALPHA]);
d[PIXEL_RED] = (QUANTUM)
((MaxRGB_alpha * s[PIXEL_RED] + alpha * MaxRGB_beta * d[PIXEL_RED] / QUANTUM_MAX) / QUANTUM_MAX + 0.5);
d[PIXEL_GREEN] = (QUANTUM)
((MaxRGB_alpha * s[PIXEL_GREEN] + alpha * MaxRGB_beta * d[PIXEL_GREEN] / QUANTUM_MAX) / QUANTUM_MAX + 0.5);
d[PIXEL_BLUE] = (QUANTUM)
((MaxRGB_alpha * s[PIXEL_BLUE] + alpha * MaxRGB_beta * d[PIXEL_BLUE] / QUANTUM_MAX) / QUANTUM_MAX + 0.5);
d[PIXEL_ALPHA] = (QUANTUM)((MaxRGB_alpha + alpha * MaxRGB_beta / QUANTUM_MAX) + 0.5);
}
dst += dststride;
src += srcstride;
}
}
void compositeOver(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
if (opacity == OPACITY_TRANSPARENT)
return;
if (opacity != OPACITY_OPAQUE) {
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
continue;
alpha = (s[PIXEL_ALPHA] * opacity) / QUANTUM_MAX;
invAlpha = QUANTUM_MAX - alpha;
d[PIXEL_RED] = (d[PIXEL_RED] * invAlpha + s[PIXEL_RED] * alpha) / QUANTUM_MAX;
d[PIXEL_GREEN] = (d[PIXEL_GREEN] * invAlpha + s[PIXEL_GREEN] * alpha) / QUANTUM_MAX;
d[PIXEL_BLUE] = (d[PIXEL_BLUE] * invAlpha + s[PIXEL_BLUE] * alpha) / QUANTUM_MAX;
alpha = (d[PIXEL_ALPHA] * (QUANTUM_MAX - s[PIXEL_ALPHA]) + s[PIXEL_ALPHA]) / QUANTUM_MAX;
d[PIXEL_ALPHA] = (d[PIXEL_ALPHA] * (QUANTUM_MAX - alpha) + s[PIXEL_ALPHA]) / QUANTUM_MAX;
}
dst += dststride;
src += srcstride;
}
}
else {
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
continue;
if (d[PIXEL_ALPHA] == OPACITY_TRANSPARENT || (d[PIXEL_ALPHA] == OPACITY_OPAQUE && s[PIXEL_ALPHA] == OPACITY_OPAQUE)) {
memcpy(d, s, stride * sizeof(QUANTUM));
continue;
}
invAlpha = QUANTUM_MAX - s[PIXEL_ALPHA];
alpha = (d[PIXEL_ALPHA] * invAlpha + s[PIXEL_ALPHA]) / QUANTUM_MAX;
d[PIXEL_RED] = (d[PIXEL_RED] * invAlpha + s[PIXEL_RED] * s[PIXEL_ALPHA]) / QUANTUM_MAX;
d[PIXEL_GREEN] = (d[PIXEL_GREEN] * invAlpha + s[PIXEL_GREEN] * s[PIXEL_ALPHA]) / QUANTUM_MAX;
d[PIXEL_BLUE] = (d[PIXEL_BLUE] * invAlpha + s[PIXEL_BLUE] * s[PIXEL_ALPHA]) / QUANTUM_MAX;
d[PIXEL_ALPHA] = (d[PIXEL_ALPHA] * (QUANTUM_MAX - alpha) + s[PIXEL_ALPHA]) / QUANTUM_MAX;
}
dst += dststride;
src += srcstride;
}
}
}
void compositeIn(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
QUANTUM *d;
QUANTUM *s;
Q_INT32 i;
double sAlpha, dAlpha;
double alpha;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
{
memcpy(d, s, stride * sizeof(QUANTUM));
continue;
}
if (d[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
continue;
sAlpha = QUANTUM_MAX - s[PIXEL_ALPHA];
dAlpha = QUANTUM_MAX - d[PIXEL_ALPHA];
alpha=(double) (((double) QUANTUM_MAX - sAlpha) * (QUANTUM_MAX - dAlpha) / QUANTUM_MAX);
d[PIXEL_RED]=(QUANTUM) (((double) QUANTUM_MAX - sAlpha) *
(QUANTUM_MAX-dAlpha) * s[PIXEL_RED] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_GREEN]=(QUANTUM) (((double) QUANTUM_MAX - sAlpha)*
(QUANTUM_MAX-dAlpha) * s[PIXEL_GREEN] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_BLUE]=(QUANTUM) (((double) QUANTUM_MAX - sAlpha)*
(QUANTUM_MAX - dAlpha) * s[PIXEL_BLUE] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_ALPHA]=(QUANTUM) ((d[PIXEL_ALPHA] * (QUANTUM_MAX - alpha) / QUANTUM_MAX) + 0.5);
}
dst += dststride;
src += srcstride;
}
}
void compositeOut(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
QUANTUM *d;
QUANTUM *s;
Q_INT32 i;
double sAlpha, dAlpha;
double alpha;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
if (s[PIXEL_ALPHA] == OPACITY_TRANSPARENT)
{
memcpy(d, s, stride * sizeof(QUANTUM));
break;
}
if (d[PIXEL_ALPHA] == OPACITY_OPAQUE)
{
d[PIXEL_ALPHA]=OPACITY_TRANSPARENT;
break;
}
sAlpha = QUANTUM_MAX - s[PIXEL_ALPHA];
dAlpha = QUANTUM_MAX - d[PIXEL_ALPHA];
alpha=(double) (QUANTUM_MAX - sAlpha) * d[PIXEL_ALPHA]/QUANTUM_MAX;
d[PIXEL_RED] = (QUANTUM) (((double) QUANTUM_MAX - sAlpha) * dAlpha * s[PIXEL_RED] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_GREEN] = (QUANTUM) (((double) QUANTUM_MAX - sAlpha) * dAlpha * s[PIXEL_GREEN] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_BLUE] = (QUANTUM) (((double) QUANTUM_MAX - sAlpha) * dAlpha * s[PIXEL_BLUE] / QUANTUM_MAX / alpha + 0.5);
d[PIXEL_ALPHA]=(QUANTUM) ((d[PIXEL_ALPHA] * (QUANTUM_MAX - alpha) / QUANTUM_MAX) + 0.5);
}
dst += dststride;
src += srcstride;
}
}
void compositeAtop(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
if (opacity == OPACITY_TRANSPARENT)
return;
QUANTUM *d;
QUANTUM *s;
Q_INT32 i;
double sAlpha, dAlpha;
double alpha, red, green, blue;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
sAlpha = QUANTUM_MAX - s[PIXEL_ALPHA];
dAlpha = QUANTUM_MAX - d[PIXEL_ALPHA];
alpha = ((double)(QUANTUM_MAX - sAlpha) *
(QUANTUM_MAX - dAlpha) + (double) sAlpha *
(QUANTUM_MAX - dAlpha)) / QUANTUM_MAX;
red = ((double)(QUANTUM_MAX - sAlpha) * (QUANTUM_MAX - dAlpha) * s[PIXEL_RED] / QUANTUM_MAX +
(double) sAlpha * (QUANTUM_MAX-dAlpha) * d[PIXEL_RED]/QUANTUM_MAX) / alpha;
d[PIXEL_RED] = (QUANTUM) (red > QUANTUM_MAX ? QUANTUM_MAX : red + 0.5);
green = ((double) (QUANTUM_MAX - sAlpha) * (QUANTUM_MAX - dAlpha) * s[PIXEL_GREEN] / QUANTUM_MAX +
(double) sAlpha * (QUANTUM_MAX-dAlpha) * d[PIXEL_GREEN]/QUANTUM_MAX)/alpha;
d[PIXEL_GREEN] = (QUANTUM) (green > QUANTUM_MAX ? QUANTUM_MAX : green + 0.5);
blue = ((double) (QUANTUM_MAX - sAlpha) * (QUANTUM_MAX- dAlpha) * s[PIXEL_BLUE] / QUANTUM_MAX +
(double) sAlpha * (QUANTUM_MAX - dAlpha) * d[PIXEL_BLUE]/QUANTUM_MAX) / alpha;
d[PIXEL_BLUE] = (QUANTUM) (blue > QUANTUM_MAX ? QUANTUM_MAX : blue + 0.5);
d[PIXEL_ALPHA]=(QUANTUM) (QUANTUM_MAX - (alpha > QUANTUM_MAX ? QUANTUM_MAX : alpha) + 0.5);
}
dst += dststride;
src += srcstride;
}
}
#if 0
void compositeXor(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositePlus(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeMinus(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeAdd(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeSubtract(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeDiff(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeMult(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
void compositeBumpmap(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
QUANTUM invAlpha;
Q_INT32 i;
}
#endif
void compositeCopy(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
Q_INT32 linesize = stride * sizeof(QUANTUM) * cols;
QUANTUM *d;
QUANTUM *s;
QUANTUM alpha;
Q_INT32 i;
d = dst;
s = src;
while (rows-- > 0) {
memcpy(d, s, linesize);
d += dststride;
s += srcstride;
}
}
void compositeCopyChannel(PIXELTYPE pixel,
Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
QUANTUM *d;
QUANTUM *s;
Q_INT32 i;
while (rows-- > 0) {
d = dst;
s = src;
for (i = cols; i > 0; i--, d += stride, s += stride) {
d[pixel] = s[pixel];
}
dst += dststride;
src += srcstride;
}
}
void compositeCopyRed(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_RED, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
void compositeCopyGreen(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_GREEN, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
void compositeCopyBlue(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_BLUE, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
void compositeCopyOpacity(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{
compositeCopyChannel(PIXEL_ALPHA, stride, dst, dststride, src, srcstride, rows, cols, opacity);
}
void compositeClear(Q_INT32 stride,
QUANTUM *dst,
Q_INT32 dststride,
QUANTUM *src,
Q_INT32 srcstride,
Q_INT32 rows,
Q_INT32 cols,
QUANTUM opacity = OPACITY_OPAQUE)
{