Assorted Java libs made with/for APDE
- basic functionality exists & documented (mostly)
As of now (29.05.2020) I can't seem to push to a private repository, so this is public.
Have a look at the tutorial and forU.I Examples
- ClipDraw - Clipping with arbitrary region
- ForTex - Procedural texture generation
- Mold and seal generation
- ...
Up to a point..
-
Can read fonts with CMAP formats
- 12 - Full UTF-32 coverage ( Yep, linear-b: 𐂂 if you don't see a deer head, your browser is not supporting the full UTF32 charset...)
- 4 - UTF-16
- 0 - ASCII
-
Base class TTFont without dependencies.
-
Wapper class Ttf for Processing/Android/APDE convenient use. Allows to
- Draw to any
PGraphics
(with Glyph outline stroked!) - Create a 2D
PShape
- Create a 3D extruded
PShape
- Draw to any
There often is the need for a simple user interface in a sketch, be it during development or to trigger user actions. Available libraries for Processing depend on nonexisting java.awt etc. or are written in a too modern Java dialect, making them impossible to use with APDE
forU.I will provide that, offering
- a basic Button class to trigger actions, ie. call a void whatever() method in your applet when pressed.
- Switch, Slider, List, ... classes derived from that
- Simple Text input with automatic Keyboard control (Android only)
- The Actor class to tie these into a dialog and handle user interaction (mostly 'behind the scenes')
- class UI fot a simple static interface
- Clean class structure and API designed for both ease of use and expandabilty
- much more...
In its most simple form all you have to do is
import forU.I.*;
void setup(){
fullScreen(P3D);
textSize(32); // DONT remove.
new UI(this, 64); // default button text height
UI.add("hello","world"); // just a plain button, for now.
}
void draw(){
background(frameCount%255); // OMG, it's alife!
// your drawing code here
}
void world(){ // gets called when the button is pressed
println("Hello world!");
}
to display an action button on top of your sketch display.
Add more elements, customize them, connect to your sketch variables, subclass, add menus, popups etc..
More in the forU.I Examples ...
(will probably get its own lib)
- Executed in the fragment shader
- Compiled on the fly from a Forth-like language (ForSH) into GLSL
- Piggybacked on PImage.
- ...
(Soon)
- Clipping with arbitrary regions
- Offset paths (aka. Inflate/deflate/aura)
- Wraps & includes de.lighti.clipper
- ...
- Procedural pattern creation trying to mimic
- Zentangle or
- Pattern Collections drawings.
- Patterns are defined in Forth-flavoured layered script language.
- class Doodle - "Pen and paper,;and Zen",
- Implements ShapeCreator
- Linear and nonlinear(!) transformations
- "Aura" , reserving and restricting to regions, clipping, ....
- class ForZen - 'Brain and hand'
- Script evaluation
- Callback implementations like
- #second
- #Text
- ...
- class Doodle - "Pen and paper,;and Zen",
- Double line elimination
- optimized GCODE generation
- use a clothes pin and a M3 screw to upgrade your 3D-Printer to a pen plotter.
- now you see what this lib was created for
26.05.2020:
- Ttf useable, documented, examples.
- CharTable example
- UI useable, examples
- File selector example
- Dokumentation
- Put ForZen/ForTex, Apps, into separate repos.
- Unzip into
Sketchbook/libraries/forU
so that ypu getSketchbook/libraries/forU'/library/
Sketchbook/libraries/forU/library-dex/
Sketchbook/libraries/forU'/examples/
- etc. pp.
- or install from APDE by
- Tools
- Import Library
- Manage libraries
- Install compressed library
- ...
The methods for opening/closing the soft keyboard and handling gestures on Android were copied from the Ketai library by Daniel Sauter.
See separate credits in TTFont
And of course the incredible APDE
All code here was written ( if not copied from elsewhere ), edited and tested with APDE , and APDE only, on a cell phone, single-finger typing...I might explain why on another day.
Praise Calsign!
Also, the .jar and -dex.jar libraries here where created with APDE.
- write Howto on creating libraries with APDE.
Find it on GitHub here
Never thought I would write so much doku (this) again, and like it!
For some time, all I wrote either/and/or was ' too/not enough precise/short/long/open/understandable by the legal department/beautiful enough in general... , so that was done by others (plural!) for me...and explaining to them often was seemed more effort than writing it myself.
MarkDown and
put back the fun. Tnx.
If I had found his
Functions Utilities Widgets for Processing Android
Without third party libraries.
a year before, much of this would not have been written...still, it is a completely different approach. Tnx for the clipboard and popup menu example.
https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android
Some essential, some mandatory, some recommended:
- Processing
- GitHub
You know how that works, so
- TrueCommander
- DiffTools
- QuickEdit
- Hacker's Keyboard
- APK Editor
- ...
Why did I create these libraries?
- I just could not find one fitting on my cart in the usual places or for an affordable price. So I made my own, and along the way realized others having the same problems might find them useful for their purpose. So here you are.
- All libraries I found on the web were either/or
- Not in a Java dialect compatible with APDE
- Not useable on Android
- Not in Java
- ...
- I have always hated to be dependend on components for which no source is available and recompilable by me. All to often they just disappear at some time, become incompatible with progress or are buggy to start with...not saying that is not true for this library, but I preffer to fix my own bugs over hunting down (and then trying to work around instead of fixing) somebody elses. The ones you find here are all mine and not to be blamed on the credits
- Accordingly, some pains were taken to
- make the key components as independend as possible, while
- providing an API and interfaces as simple as possible. See TTFont/Ttf
- make classes expandable
Oh, and it's a cartwheel, not a Formula1-tire - not intended for a race against hardware/bitmap backed operating system functions..but reliable bronce-age design - robust enough, see the 'TTF_UI_05_starscroll` example in examples
Android 10 / API 29
Baseband Version: 21C20B377S000C000,21C20B377S000C000
Build Number: YAL-L61 10.0.0.200(C431E3R1P2)
Linux Kernel Version: 4.14.116
Http User Agent: Dalvik/2.1.0 (Linux; U; Android 10; YAL-L21 Build/HUAWEIYAL-L61)
/***************************************************************************************
* forU.Ttf
* forU.I
* Copyright (c) 2019-2020 by the author
* @author Ullrich Heinemann , https://github.com/uheinema
*
* All rights reserved.
* Ttf - A simple, platform-agnostic library for handling TrueType fonts.
* I - Easy to use lightweight user interface
* Released under the terms of the GPLv3, refer to: http://www.gnu.org/licenses/gpl.html
***************************************************************************************/