Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxBeaver authored Jun 23, 2024
1 parent c0ed2e3 commit 7be3ab2
Show file tree
Hide file tree
Showing 17 changed files with 867 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/build_everything_Linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

for dir in *
do
if test -f "$dir/build_linux.sh"
then
echo "building in $dir"
( cd "$dir" && bash ./build_linux.sh ) || exit 1
fi
done

mkdir -p LinuxBinaries
mv $(find . -name '*.so') LinuxBinaries/


15 changes: 15 additions & 0 deletions code/build_everything_Windows_MYSYS2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

for dir in *
do
if test -f "$dir/build_linux.sh"
then
echo "building in $dir"
( cd "$dir" && bash ./build_linux.sh ) || exit 1
fi
done

mkdir -p WindowsBinaries
mv $(find . -name '*.dll') WindowsBinaries/


4 changes: 4 additions & 0 deletions code/invert_transparency_D/build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash


meson setup --buildtype=release build && ninja -C build
39 changes: 39 additions & 0 deletions code/invert_transparency_D/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.
*/

#pragma once

#define ARCH_X86 1

#define ARCH_X86_64 1

#define GEGL_LIBRARY "gegl-0.4"

#define GEGL_MAJOR_VERSION 0

#define GEGL_MICRO_VERSION 34

#define GEGL_MINOR_VERSION 4

#undef GEGL_UNSTABLE

#define GETTEXT_PACKAGE "gegl-0.4"

#define HAVE_EXECINFO_H

#define HAVE_FSYNC

#undef HAVE_GEXIV2

#undef HAVE_LUA

#define HAVE_MALLOC_TRIM

#undef HAVE_MRG

#define HAVE_STRPTIME

#define HAVE_UNISTD_H

92 changes: 92 additions & 0 deletions code/invert_transparency_D/invert-alpha.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* This file is an image processing operation for GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* GEGL 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
*
* Copyright 2006 Øyvind Kolås <pippin@gimp.org>
* Beaver's Invert Transparency filter. 2022
*/

/*
This is the GEGL Graph of invert transparency. So users can test it without installing.
id=1 color-overlay value=#ffffff gimp:layer-mode layer-mode=behind opacity=1.00 aux=[ color value=#000000 ] id=2 gimp:layer-mode layer-mode=color-erase opacity=1.00 aux=[ color value=#ffffff ] crop
color-overlay value=#0aff00
--
The code for this filter is very simple. Thus a good plugin to study for people who want to develop new GEGL filters. All it is is a embedded GEGL Graph and a color overlay.
*/

#include "config.h"
#include <glib/gi18n-lib.h>

#ifdef GEGL_PROPERTIES

#define TUTORIAL \
" id=1 color-overlay value=#ffffff gimp:layer-mode layer-mode=behind opacity=1.00 aux=[ color value=#000000 ] id=2 gimp:layer-mode layer-mode=color-erase opacity=1.00 aux=[ color value=#ffffff ] crop "\



property_color (value, _("Color"), "#000000")
description (_("The color to paint over the inverted transparency"))
ui_meta ("role", "color-primary")

#else

#define GEGL_OP_META
#define GEGL_OP_NAME invert_alpha
#define GEGL_OP_C_SOURCE invert-alpha.c

#include "gegl-op.h"

static void attach (GeglOperation *operation)
{
GeglNode *gegl = operation->node;
GeglNode *input, *output, *it, *col;

input = gegl_node_get_input_proxy (gegl, "input");
output = gegl_node_get_output_proxy (gegl, "output");

it = gegl_node_new_child (gegl,
"operation", "gegl:gegl", "string", TUTORIAL,
NULL);

col = gegl_node_new_child (gegl,
"operation", "gegl:color-overlay",
NULL);

gegl_operation_meta_redirect (operation, "value", col, "value");

gegl_node_link_many (input, it, col, output, NULL);
}

static void
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;

operation_class = GEGL_OPERATION_CLASS (klass);

operation_class->attach = attach;

gegl_operation_class_set_keys (operation_class,
"name", "lb:invert-transparency",
"title", _("Invert Transparency"),
"categories", "Technical",
"reference-hash", "2kc15254a2385110001adc2544142af",
"description", _("Replace Transparency with color and color with transparency "
""),
NULL);
}

#endif
23 changes: 23 additions & 0 deletions code/invert_transparency_D/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
project('invert-alpha', 'c',
version : '0.1',
license : 'GPL-3.0-or-later')

# These arguments are only used to build the shared library
# not the executables that use the library.
lib_args = ['-DBUILDING_INVERTALPHA']

gegl = dependency('gegl-0.3', required : false)
if not gegl.found()
gegl = dependency('gegl-0.4')
endif
shlib = shared_library('invert-alpha', 'invert-alpha.c', 'config.h',
c_args : lib_args,
dependencies : gegl,
name_prefix : '',
)

# Make this library usable as a Meson subproject.
stroke_dep = declare_dependency(
include_directories: include_directories('.'),
link_with : shlib)

4 changes: 4 additions & 0 deletions code/shapes/build_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash


meson setup --buildtype=release build && ninja -C build
39 changes: 39 additions & 0 deletions code/shapes/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.
*/

#pragma once

#define ARCH_X86 1

#define ARCH_X86_64 1

#define GEGL_LIBRARY "gegl-0.4"

#define GEGL_MAJOR_VERSION 0

#define GEGL_MICRO_VERSION 34

#define GEGL_MINOR_VERSION 4

#undef GEGL_UNSTABLE

#define GETTEXT_PACKAGE "gegl-0.4"

#define HAVE_EXECINFO_H

#define HAVE_FSYNC

#undef HAVE_GEXIV2

#undef HAVE_LUA

#define HAVE_MALLOC_TRIM

#undef HAVE_MRG

#define HAVE_STRPTIME

#define HAVE_UNISTD_H

Loading

0 comments on commit 7be3ab2

Please sign in to comment.