package gg
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Basic types for computer graphics in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
gg-1.0.0.tbz
sha512=86e3db9778103c6a9e3444585716c12dba0ba1af6b60e7b76f9cf282a23aa4cb075c764c470e9a878c3c90fe4a41e835be9180aaf0a4bc43ce3ad299b352e611
doc/CHANGES.html
v1.0.0 2022-02-15 La Forclaz (VS)
- Require OCaml 4.08.
- Handle
Pervasives's deprecation (and thus provide OCaml 5.00 support). - Drop dependency on
bigarray's ocamlfind package (and thus provide OCaml 5.00 support). - Change the semantics of
Box{1,2,3}.inset. Rather than return the empty box when the size in a dimensionibecome negative, clamp it to0and use theith coordinate of the mid point of the box for theith coordinate of the resulting box's origin. This means that insetting boxes with large values eventually degenerates to the mid point of a box instead of the empty box. This avoids losing a box's location when one grows and shrinks them arbitrarily, e.g. in reaction to user input. Thanks to Michel Schinz for suggesting this better semantics. - Change
Gg.Float.pphexadecimal notation renderer to use the built-in"%h"string introduced in OCaml 4.03.0. Nans, zeros and infinities will render differently. Use the deprecatedGg.Float.pp_legacyif you need to recover the old hex rendering. The
Gg.Floatmodule now includesStdlib.Float(#19). Some values initially implemented inGg.Floatnow useStdlib.Float's definition or are deprecated in favour of corresponding functionality named differently. Implementations may differ but this shouldn't matter most of the time except for the first three items in this list:- WARNING
Gg.Float.equalis deleted in favour ofStdlib.Float.equalThe implemention differs, it moves fromx = ytocompare x y = 0which differs on nan values.Stdlib.Float.equaltreats them as equalGg.Float.equaldoes not. - WARNING
Gg.Float.roundis deleted and becomesStdlib.Float.round. The implementation and behaviour on negative numbers differs.Gg.Float.roundalways rounded towards positive infinity on ties (-2.on-2.5).Stdlib.Float.rounds away from zero on ties (-3.on-2.5). - WARNING
Gg.Float.round_to_intis affected by the newroundimplementation (see previous point). Gg.Float.compareis deleted and becomesStdlib.Float.compare(same implementation).Gg.Float.piis deleted and becomesStdlib.Float.pi, the bit pattern of the value is unchanged.Gg.Float.is_infis implemented byStdlib.Float.is_infiniteand deprecated in favour of it (different implementation).Gg.Float.is_intis implemented byStdlib.Float.is_integerand deprecated in favour of it (different implementation).Gg.Float.is_nanis deleted and becomesStdlib.Float.is_nan(same implementation)Gg.Float.fmaxis implemented byStdlib.Float.max_numand deprecated in favour of it. The result ofGg.Float.fmax (-0.) (+0.)is changed, it returns+0.instead of-0..Gg.Float.fminis implemented byStdlib.Float.min_numand deprecated in favour of it. The result ofGg.Float.fmin (+0.) (-0.)is changed, it returns-0.instead of+0..Gg.Float.sign_bitis deleted and becomesStdlib.Float.sign_bit(different implementation).Gg.Float.succis deleted and becomesStdlib.Float.succ(different implementation).Gg.Float.predis deleted and becomesStdlib.Float.pred(different implementation).Gg.Float.nanis renamed toGg.Float.nan_with_payloadto leave room forStdlib.Float.nan's constant.
- WARNING
v0.9.3 2018-10-23 Zagreb
- Add
Color.to_srgbi(inverse ofColor.v_srgbi). Thanks to Christophe Troestler for the patch. - Add missing constraints on
Float.{is_nan,equal,compare}. Polymorphic equality was being used. Thanks to Christophe Troestler for the report (#17). - Fix bug in
Gg.M3.rot2 ?pt:(Some _)(#18).
v0.9.2 2017-01-24 La Forclaz (VS)
- Add
Box{1,2,3}.add_pt. Thanks to Christophe Troestler for the suggestion. V{2,3,4}.normavoid {under,over}flows. Thanks to Christophe Troestler for the report and guidance.- Fix
Size.of_w. Thanks to @rand00 for the report and the fix. - Safe-string support.
- Build depend on topkg.
- Relicense from BSD3 to ISC.
v0.9.1 2015-08-14 Cambridge (UK)
- Fix
Box1.ppand add to toplevel support. - Fix broken
Box{1,2,3}.subsetfunctions. Thanks to Armaël Guéneau for the report. - Change toplevel support scheme,
#require "gg"no longer automatically opensGgand installs printers. You now have to#require "gg.top"for this to happen.
v0.9.0 2014-08-23 Cambridge (UK)
- Fix toplevel printer installation.
- Use package builder topkg for distribution.
- Add
Gg.Ba(experimental). Convenience module for linear 1D bigarrays. The library now depends on Bigarrays. - Many changes and fixes to the experimental
Gg.Rastermodule. - Removed
to_stringfunctions, they were not thread safe and we now haveFormat.asprintfwhich can be used with the pretty printers. - Add an optional argument to
M3.rot2to specify a center for the rotation. - Optimize
M{2,3,4}.mulonM{2,3,4}.idarguments. - Add
M4.{move2,rot2,scale2,rigid2} - Rename
M4.{ortho,persp}, replace~bottomby~bot. - Add
Size1module for sizes in 1D space. - Add
Box1module for 1D axis-aligned boxes (closed intervals). - Add
Size2.{aspect,of_h,of_w}functions. - Add
Box2.{bm_pt,ml_pt,mm_pt,mr_pt,tm_pt}for accessing middle points on the sides. - Rename
Box2.{bottom,top}_{left,right}toBox2.{b,t}{l,r}_pt. - Add
Box3.{fbl,fbr,ftl,ftr,nbl,nbr,ntl,ntr}corner accessors. - Fix a bug in
Box3.inset, new size was incorrectly computed.
The following functions were renamed so that each module uses the same name for the same transform. Previously we had e.g. M3.scale and M4.scale3 (3D) and M4.scale (4D) which is confusing and inconvenient when one wants to switch from one matrix to the other.
- Rename
M2.{rot,scale}toM2.{rot2,scale2}. - Rename
M3.{move,rot,rigid,srigid}toM3.{move2,rot2,rigid2,srigid2}. - Rename
M3.{rot_{map,axis,zyx},scale}toM3.{rot3_{map,axis,zyx},scale3}. - Rename
M4.{move,rot_{map,axis,zyx},scale,rigid,rigidq,srigid,srigidq}toM3.{move3,rot3_{map,axis,zyx},scale,rigid3,rigid3q,srigid3,srigid3q} - Rename
M4.scaletoM4.scale4 - Rename
M4.{rot_{map,axis,zyx},to_rot_{axis,zyx}toM4.{rot3_{map,axis,zyx},to_rot3_{axis,zyx}.
v0.8.0 2013-09-24 Lausanne
First release. Part of the work was sponsored by Citrix Systems R&D and OCaml Labs.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page