All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.
- [breaking] all shapes creating functions moved to separate namespace:
clojure2d.core.shape
Moved to fastmath 3.x
- White point manipulation namespace
clojure2d.color.whitepoints delta-accepts input without conversion- various conversions related to XYZ and white points
- spectrum <-> XYZ converter
init-fnandclose-fncallbacks for window creation and closingradial-gradient-modeandlinear-gradient-modeadded
- [breaking]
reduce-colorsuses (fuzzy)-kmeans++ and arguments are changed - api for
delta-functions wavelengthconversion uses interpolated color matching function
delta-E*-94- error of calculatingC*var
- Refreshed palettes and gradients
quad-strip
OHTAconversion should coerce input to colorIgPgTgnormalized conversion fixedHCLconversion fixed (uncached case)- eastwood related fixes
custom-eventandfire-custom-eventto allow firing an event from the code
apply-themeto generate random color from a given color and theme definitionwhitenandblackento-XYZ1,from-XYZ1not scaled version (range from 0 to around 1)scale3 or 4 channels by a value (to easier normalize rgb), alsoscale-up,scale-down- new colorspaces from colour:
- more from
Oklabfamily:Okhsv,OkhslandOkhwb DIN99color space family::DIN99,:DIN99b,:DIN99c,:DIN99dand:DIN99oreduce-colorscan accept a distance (as function orfastmath.distanceobject),claransalgorithm is used then (instead ofxmeans).claranspath is very slow though.- path definition accepts winding rule and shape appending
- certain shapes can accept coordinates as vectors
:onrepaintrefresher type for a window, leaves repainting a window for AWT. Good when you want to diplay a static image.:positionargument for window creation, sets location of the window in desired position.mixboxpigment-based color mixing by Secret Weaponsgrid-qr-cellto allow draw grid cells inq,rcoordinate systemclj-kondoconfigs
Oklabshould use linear RGB not on sRGBUCS-OSAcolor space should have different order ofgandjchannels.IPTshould operate on not scaled XYZ- missing palettes from
:nord LDRendererwith filtering should draw on borders- [breaking]
to-lchandfrom-lchrenenamed toto-luma-color-hueandfrom-luma-color-hue#21
LDRendererrevisited- added new
to-pixelmodes:linear?(default:false), whentrueturns offlogscalingsplats?(default:false), whentrueaverages pixel's values only
vibrancyis1.0by default (was0.5)- contrast/saturation/brightness don't affect background now
- changed internal splat representation (as a number from
0.0to1.0)
- added new
show-image(and other functions inclojure2d.extra.utils) uses:onrepaintrefreshing strategy by default.
- Dependency to
smile-mklis removed.openblasseems to be enough for current functionality. This makes a package lighter (1GB -> 250MB).
- Clojure 1.11.0
shapeintroduced (all primitives have additiona shape version) + functions:bounding-box,intersects-rectangle?,contains-point?andcontains-rectangle?shape->path-defandpath-def->shapeto construct path from a definition and backtext-shapereturns shape of the textload-fontloads fonts from a fileload-image,load-svgandload-bytescan load from http URLs now- PalettonHSV, RYB, XYB and Oklab color spaces
- Dictionary of Colour Combinations - colors and palettes (prefix
:docc) - https://github.com/mattdesl/dictionary-of-colour-combinations - Color Vision Deficiency
cvd-lensfunction (a filter) mixsubsubtactive mixingadjustadds a value to color channelcomplementaryto find complementary colorrandom-colorcan select from various presets, also selects colors from palettes and known colorswavelengthreturns color from light wavelength in nmclojure2d.color.cssgramset of instagram-like filters +custom-filterfunction- many more color difference functions
:retinahint added to support high density displays (first attempt, things might not work well)
- LDRednerer is aware of alpha channel now
paletteshould return a vector in every casepathpoints should be any seq (not vector only)possible-color?should recognize String as a valid colorHWBcolorspaces fixed to ensure reversibility- canvas orientation shift
- color difference functions revisited and reorganized
load-url-image- useload-image
- fastmath deps updated
- deps updated
- deps updated
- Introduced cpt-city palettes and gradients
- Introduced paletteer palettes and gradients
- Updated fastmath and batik deps
- Refactor to load gradients and palettes dynamically
- [breaking] due to the number of palettes/gradients,
find-paletteandfind-gradientshould be used to find names.
compose-channelsapplies alpha blending by default when alpha channel processing is turned off.
- internal core optimizations (fn -> macros)
- deps updated
lerp-color interpolator
possible-color?catches gradientiq-gradientwrong interpolation between two colors
- mathematica gradients (thanks to Chris N.)
palettehelper functiontemperatureto convert black-body emissions to colorget-channel,set-channel,modulate- to manipulate channels in selected color spacerelative-luma(WCAG version)- more String as color (single letter, triplets, #rgba)
- correct-lightness for gradient and palette
- deps bumped
- pixels mutating functions are now with
! - [breaking] all blending functions moved to separate namespace and reweritten from the scratch
- [breaking] changed API for certain color functions. Especially for [[palette]] and [[gradient]]
- Signal processing - moved to fastmath
- palette/gradient presets as vars (use [[palette]] or [[gradient]] to access them)
- Closing window during
drawcan cause NPE when accessing global state. HCLis now proper HCL by Sarifuddin and Missaou (to use CIELab version use LCH)brighten/darkenandsaturate/desaturatecorresponds to chroma.js nowmixcorresponds to chroma.js nowcontrast-ratioreflects WCAG definition
:always-on-top?parameter to set window to be on toporient-canvas- axis orientation functionsfilter-channel,filter-channel-xy,blend-channelandblend-channel-xycan accept function as a parameter single parameter (acts a partial)..set-compositeandcompositeto compose drawing with canvas by Java2d, see java.awt.Composite- new window parameter,
:backgroundset panel background color - bounding box for given text
load-url-imageto handle loading from URLpattern-modeto set textured fill for shapes- Gradient density rendering
- BREAKING: by default canvas is fully transparent. Window background is set to white. This is made to match html canvas behaviour.
- BREAKING:
set-backgrounduses SrcOver (default) composite. Previously was Src.
- thi.ng/color dependency
- Bring window to top // (still doesn't work well)
- Headless mode fix
- Blur algorithm rounding (ghosting effect)
- Native color conversion
from-was clumping an input
- grid cells
- hex primitive
- quadtree segmentation now uses low-discrepancy sequence generator
- reconstruction filters spread parameter
- Hann reconstruction filter
- reconstruction filters default values
- refactored renderer, breaking change: intensity is now vibrancy and acts opposite way
- reconstruction filters errors
packcolor into 32 bit integerresizePixels- 4 new color spaces: IPT, LMS, JAB, JCH
- new palettes and gradient
- new color distance based on JAB
- list of all predefined colors, palettes and gradients have separate docs
reduce-colors- selects color from cluster usingmoderather than centroid- html-color* -> named-color*
Pixelscan be treated as sequence now (sequence of colors)reduce-colorsusing x-means clustering algorithm
iq-gradientaccepts also two colors (https://github.com/thi-ng/color/blob/master/src/gradients.org#gradient-coefficient-calculation)load-svgandtranscode-svgadded
merge-rendererscan merge any number of renderers (previously only two).iq-random-gradientalso usesiq-gradientfor two colors generated by paletton generatorrandom-gradientuses also iq-random-gradient functionfilled-with-strokeis macro now- removed dependency to
Vec2in some functions inclojure2d.core
random-gradientwill use only two interpolators (:cubic and :linear) to avoid exceed of the range
- arc and rarc (radius arc) functions
- spots overlay - number of spots heuristic changed
Please note - breaking changes!
- key-pressed? mouse-pressed? (and other event values) functions available in
draw-fn(via Window protocols) - lerp in color (to interpolate colors)
- set-stroke-custom - to set custom stoke pattern
- to-XXX* / from-XXX* are now normalized (0-255) colorspace conversion functions.
- color distances
- color interpolators
- color preset palettes (Brewer, Tableaus, Microsoft)
- color gradients
- color tweaking functions
- font-ascent
- thi.ng rgba interoperability
- project dependencies to external
generateme/fastmathlibrary - to-luma -> luma, get-hue -> hue
- hue returns angle (0 - 360)
- make-color, make-awt-color, make-canvas, make-2d-...-array changed to names without
make-prefix - make-pixels -> pixels
- make-effect* -> effect
- almost all make- in raymarching are changed to version without prefix
resize-imageandresize-canvasare now moved to ImageProto asresize- xor-mode, gradient-mode are reset with paint-mode
- to-XXX/from-XXX in colorspaces are raw conversions now
- YXY renamed to Yxy
- make-color-converter -> color-converter
- paletton-palette -> paletton
- signal processing refactored, api changed
- overlays refactored
- glitch scripts refectored, api changed
Prefix make- is reserved when function is created.
- set-font works now
- math namespaces moved to
generateme/fastmathproject - examples moved to separate repository
with-canvasis no longer threading macro (usewith-canvas->for that):setupparameter added toshow-window. It's run before displaying window. Parameters are: canvas (within context) and window. When returned value is notnilit's used as initial state. In other case:draw-stateparameter is used.- color can be represented as int (eg. in hex form like: 0x234344)
clamp255returns double, for long version calllclamp255- bezier and curve functions added
- date/time functions (year, month, day, hour, minute, sec, millis, nanos)
- new function
filled-with-stroke- to draw primitive with stroke and filled load-bytesadded- general key-event added (like mouse-event). You can now dispatch also on event type not only key char or code
- background supports transparency
- screen-width and screen-height functions
- threshold filter wrong values
drawnow displays exception when something is wrong- window canvas was in the bad size causing visual artifacts
- more accurate frame delay calculations
with-canvasis renamed towith-canvas->:highesthint added (it's:highwith Stroke Pure)- :right, :left or :center alignments for text (last parameter, default :left)
rendering-hintsis map of vectors now, it gave 25% speed gain during recreating graphics context
- Vcf303, Echo and BassTreble signal processing effects + example 16 updated
- key-released and key-typed events added
- fractal bestiary explorer - example 37
- path-bezier - bezier spline
- text and font functions
- Java2D convolution filters (via (convolve ...)), returning image
- Expectations Tests
- ArrayVec type - doubles array vector representation (for speed gain)
- Overlays API changed to image + configuration map
- Switched from clojure math to primitive math library
- FastMath bindings changed to macros for several methods
- Saving picture moved to image protocol, replaced save-canvas and save-pixels removed (call (save canvas name)).
- KeyEvent protocols
- vector scale -> set-mag
- fixes after tests
- rgb scanlines bad tint values
- subpixel accuracy for strokes included in :high canvas profile
- New overlay - crt scanlines
- Events and Window carry global state,
show-windowparameters reorganized.
- Canvas transformations (transpose, rotate, scale, push/pop matrix)
- Image protocol (get-image, width and height fns) for Window, Canvas, image, Pixels
- Mouse position protocol to Window and MouseEvent
- Nature of Code examples
- html 140 colors defined in color namespace (access by (c/to-color :name) or (set-color canvas :name))
- point and line drawing function accept Vec2 coordinates as well
- more variations
- clojure2d temporary icon
- Canvas as a type
- Window as a type (record)
- Helper functions to check if window is visible
- Helper function to get image from canvas and window
- Color manimulations refactored (awt vs vec4)
- Complex type is Vec2 now
- Session management refactored
- Draw function accepts also Window (to access mouse position)
- Examples revisited
- Signal processing optimisations - speed gain 2x
- Core:
- session management functions
- Pixels:
- accumulation bins rendering support
- Random:
- random and low discrepancy sequence generators (binding to apache commons math)
- Color:
- color converters
- palette generators (paletton style, colourlovers 200 palettes, iq generator)
- Extra:
- glitch functions - slitscan, mirror, color redutions, bleding
- raymarching - basic raymarching
- signal - signal processing for sonification (pixels to raw, raw to pixels converters, wave generators)
- Examples: currently 32 examples
- A lot of changes and huge number of code optimizations (for speed)
- Draw function behaviour
- Canvas wrapper (Graphics2d allocation and release)
- Mouse moved event
- JPanel -> java.awt.Canvas and custom paint function
- Vectors as Seq + PersistentVector enhanced (VectorProto)
- filters changed to signal ns
Bugs, bugs, bugs + optimization for speed
- Initial release
- Core:
- image load/save
- display window
- basic canvas operations
- Pixels:
- operate on pixel and channel level
- basic filter
- blending functions
- Math:
- jafama FastMath lib
- random functions based on Apache Commons Math
- noise functions based on flow-noise and joise
- statistic functions
- Complex type
- Color:
- various blending methods
- Extra, place for common functions used in glitch/generative process
- filters.clj - analog filters (for sonification)
- overlays.clj - rgb scanlines, noise, spots
- segmentation.clj - divide image into squares
- variations.clj - fractal flames variation libarary (vector fields)
- Examples: 13 examples