aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Graph: Fix Loop.initFromPolyline()'s Winding determination, document Winding ↵Sven Gothel2023-02-1711-157/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rules for OutlineShape and add get/setWinding in Outline Loop.initFromPolyline()'s Winding determination used a 3-point triangle-area method, which is insufficent for complex shapes like serif 'g' or 'æ'. Solved by using the whole area over the Outline shape. Note: Loop.initFromPolyline()'s Winding determination is used to convert the inner shape or holes to CW only. Therefor the outter bondary shapes must be CCW. This details has been documented within OutlineShape, anchor 'windingrules'. Since the conversion of 'CCW -> CW' for inner shapes or holes is covered, a safe user path would be to completely create CCW shapes. However, this has not been hardcoded and is left to the user. Impact: Fixes rendering serif 'g' or 'æ'. The enhanced unit test TestTextRendererNEWT01 produces snapshots for all fonts within FontSet01. While it shows proper rendering of the single Glyphs it exposes another Region/Curve Renderer bug, i.e. sort-of a Region overflow crossing over from the box-end to the start.
* | Graph Font: Enhance API doc (source of values), better get*Bounds() names, ↵Sven Gothel2023-02-165-101/+137
| | | | | | | | dropping redundant getMetricWidth*(); Fix getMetricBoundsFU()
* | Graph Unit Tests: General cleanup, adding UITypeDemo01 w/ TestObject* to ↵Sven Gothel2023-02-169-52/+1400
| | | | | | | | determine CurveRenderer issues
* | Graph UI: Move methods SceneUIController to UIShape public providing ↵Sven Gothel2023-02-164-172/+444
| | | | | | | | | | | | | | | | | | | | win<->obj coord transformation, enhance documentation a little, Have win<->obj coord transformation in UIShape public: - Move SceneUIController.transformShape() -> UIShape.setTransform() - Move SceneUIController.windowToShapeCoordsImpl() -> UIShape.winToObjCoord() - Add UIShape.objToWinCoord() - Add UIShape.getSurfaceSize()
* | Graph: TypecastRenderer: Fix point-loop (no reduced 'count - 1', no break on ↵Sven Gothel2023-02-161-94/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | endOfContour), remove redundant branch B3, add Type-2 and add code dump for testing Realigned renderer code w/ Typecast's AWT demo: - TTF Quadratic Shape - The inner loop 'offset < count' is sufficient, otherwise could drop last point - point_0.endOfCountour is valid as a last point - Branch-3 and hence point-3 is not required as handled via B4 and subsequent B6 - Type-2 Cubic Shape - Added .. not tested yet Also added optional debug code dump via java cmdline `-Djogl.debug.graph.font.Renderer.Code`, which dumps plain OutlineShape construction code for testing and debugging our CurveRenderer.
* | Typecast: Glyph: getGlyphIndex() -> getID() to simplify nameSven Gothel2023-02-161-1/+1
| |
* | Typecast: Assign _glyphIndex w/ ctor argument (+ code cleanup)Sven Gothel2023-02-161-10/+17
| |
* | Graph: Merge UIListener01 + UINewtDemo01 -> UIShapeDemo01 to have simple ↵Sven Gothel2023-02-162-97/+0
| | | | | | | | test cases
* | Graph: TextRegionUtil: Make addStringToRegion(..) versatile/usable w/ ↵Sven Gothel2023-02-153-66/+70
| | | | | | | | optional AffineTransform (see Label0)
* | Graph: RegionRenderer: Offer borrowing current viewport w/o copySven Gothel2023-02-151-0/+4
| |
* | Graph TextRegionUtil: Move ShapeVisitor to OutlineShape.Visitor and ↵Sven Gothel2023-02-1513-144/+207
| | | | | | | | | | | | | | | | | | | | processString(..) to Font, cleaning up .. Further having Font.processString() return the AABBox of the whole string's 'laidout' OutlineShapes, which is used for (debug) Font.getPointsBounds2(..) just to validate the coordinated with the Glyph based AABBox of Font.getPointsBounds(..). Static TextRegionUtil.drawString(..) no more require to pass the temp AffineTransform instances (ugly).
* | Graph RegionRenderer: Expose int[4] viewport for convenienceSven Gothel2023-02-141-11/+18
| |
* | Graph Font: getGlyph(char symbol -> int glyph_id), add kerning to ↵Sven Gothel2023-02-146-40/+35
| | | | | | | | getPointsBoundsFU(); Glyph: Drop getSymbol()
* | Graph OutlineShape: Path2F alike sub-path ctor: Add z coordinate for custom ↵Sven Gothel2023-02-143-48/+54
|/ | | | plane.
* Graph Type Rendering: Drop pixelSize and use font em-size [0..1] throughout ↵Sven Gothel2023-02-1323-605/+353
| | | | | | | | | system. - All pixelSize metrics methods are dropped in Font* - TypecastGlyph.Advance dropped, i.e. dropping prescales glyph advance based on pixelSize - TextRegionUtil produces OutlineShape in font em-size [0..1] added to GLRegion - Adjusted demos
* Graph font/typecast: Adopt to our Typecast updates (see below); Fix kerning; ↵Sven Gothel2023-02-1216-263/+441
| | | | | | | | | Use TestTextRendererNEWT01 to produce validation snaps - Move kerning handling from Font to Font.Glyph using binary-search for right-glyph-id on kerning subset from this instance (left) - TextRegionUtil: Kerning must be added before translation as it applies before the current right-glyph. - TestTextRendererNEWT01 produces validation snapshots against LibreOffice print-preview snapshots - GPUTextRendererListenerBase01 added another text for kerning validation, show more font-size details (pt, px, mm)
* Typecast: Table: Use package-protected static final const, remove ↵Sven Gothel2023-02-122-51/+49
| | | | notAvailable String
* Typecast: KernSubtableFormat2: Use package-protectionSven Gothel2023-02-121-2/+2
|
* Typecast: KernSubtable: Remove getKerningTable(..), will be implemented in ↵Sven Gothel2023-02-121-11/+1
| | | | higher API layer w/ binary-search
* GlyfCompositeDescript: Remove useless try { } in ctor; Remove redundant ↵Sven Gothel2023-02-121-27/+21
| | | | variable in range-based for-loops
* Typecast: *Font*: Use constructor instead for static read(). TTFont: Add ↵Sven Gothel2023-02-123-22/+88
| | | | ctor for File and InputStream
* Update included Typecast library to 2019-09-15 commit ↵Sven Gothel2023-02-11127-4361/+4651
| | | | | | | | | | | | | | | 0d55ac0eb4a39a7f8f2a796c7eebd3ea778ba9a7 - Using Typecast's new git repo https://github.com/dcsch/typecast - Preserved our changes - Preserved loading fonts and glyph on input stream w/o font data array copies TODO - Maintain an original branch in Typecast w/ our changes to ease updates. Then we merely need to change the package name. - This also shall help to allow Typecast to use our patches, if so desired.
* Font/Graph, {Font, Glyph}/Typecast: Add kerning and expose values in ↵Sven Gothel2023-02-1022-354/+1019
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | original font-units (FU) to have them scaled later ( fu * pixelScale / unitsPerEM ) Scaling from font-units (funits, or FU) is now performed by the renderer itself, i.e. applying the scale-factor 'fontPixelSize / font.getMetrics().getUnitsPerEM()' to the PMV matrix to render the whole graph GLRegion. This finally provides proper device and resolution independent font utilization. Further, preliminary kerning has been added. +++ Also ... TypecastFont: - getGlyphID(..) getGlyph(..) enforce symbol mapping to Glyph.ID_SPACE Glyph.ID_CR, as some fonts ave an erroneous cmap (FreeSerif-Regular) - add getKerning(..) TODO: Add binary search - Set TypecastFont.USE_PRESCALED_ADVANCE := false, i.e. dropping all prescaled pixel-sized advance values mapped to font pixel-size as we utilize font-units only for later uniform scaling. - Drop virtual getPixelSize() and add static FontScale.toPixels(..) - Add fullString() for debugging purposed, including some font tables
* Typecase: OTFont: Provide KernTable accessorSven Gothel2023-02-101-0/+8
|
* Typecast: OTGlyph: Maintain the glyphID, add toString()Sven Gothel2023-02-101-3/+21
|
* Typecast: HeadTable: Use 'int' to hold 'uint16' unitsPerEM valueSven Gothel2023-02-101-3/+3
|
* Typecast: Kerning: Use 'int' to cover 'uint16' values; Detail KernSubtable ↵Sven Gothel2023-02-105-10/+88
| | | | and hold a KernSubtableFormat0 ref in KernTable
* Graph: TypecastRenderer: Add comment about TTF Glyph's having Winding.CWSven Gothel2023-02-061-0/+3
|
* Graph: Path2D -> self-contained Path2D (w/ Iterator) fixed; OutlineShape: ↵Sven Gothel2023-02-0617-593/+1311
| | | | | | Add Path2F addPath(..), emphasize required Winding.CW GPURegionGLListener01 used by TestRegionRendererNEWT01 covers Path2F CCW and CW (reverse add) methods.
* Graph: OutlineShape: Add positional addVertex() variants for component based ↵Sven Gothel2023-02-051-7/+53
| | | | addVertex methods
* Graph: Fix Region/Text Renderer: Add RegionRenderer enable/disable for ↵Sven Gothel2023-02-053-0/+11
| | | | blending stubs in display (Mesa3D results are otherwise broken)
* Graph: TestTextRendererNEWT01: No VBAA sample-count on MSAA test, fixed ↵Sven Gothel2023-02-051-6/+13
| | | | window size 1024x640
* Graph: TestTextRendererNEWT00: Alin w/ other tests, add DEPTH_TEST and allow ↵Sven Gothel2023-02-051-2/+13
| | | | custom window size
* Graph: TypecastRenderer: Simplify addShape*(), use OutlineShape's ↵Sven Gothel2023-02-051-29/+29
| | | | vertexFactory instance
* Graph: Path2D: Remove redundant accessors, comment on append(..)Sven Gothel2023-02-051-7/+11
|
* Graph: OutlineShape: Make class final, getOutlineNumber() -> getOutlineCount()Sven Gothel2023-02-051-18/+17
|
* Graph; Path2D[Iterator]: Add 'fast path' access to points array reference ↵Sven Gothel2023-02-042-80/+113
| | | | and index etc, used to avoid arraycopy (efficancy)
* Graph: Complete move jogamp.graph.plane to public com.jogamp.graph.planeSven Gothel2023-02-0417-28/+17
|
* Graph: Move jogamp.graph.plane to public com.jogamp.graph.planeSven Gothel2023-02-046-0/+0
|
* NEWT Soft-PixelScale (p7): get{Global->}PixelScaleEnv(..): Support per ↵v2.4.0Sven Gothel2023-01-314-28/+113
| | | | | | | | | | | | | | | | | monitor values w/ QT_SCREEN_SCALE_FACTORS syntax, use for X11 Per-monitor values are parsed if value is not a float and stored in a given Map<String,float[2]>, parallel to a detected global_pixel_scale_xy. The per-monitor value syntax matches QT_SCREEN_SCALE_FACTORS, i.e. the regular expression '(<string>=<float>;)+', e.g. QT_SCREEN_SCALE_FACTORS='DP-1=1.25;DP-2=1.25;HDMI-1=1.25;' The per-monitor value is preferred and on X11 stored within the MonitorDevice, matching the MonitorDevice's name. The following env-var names are searched on X11: "QT_SCREEN_SCALE_FACTORS", "QT_SCALE_FACTOR", "GDK_SCALE", "SOFT_SCALE"
* NEWT X11: Fix positionChanged: We need to translate the 0/0 client position ↵Sven Gothel2023-01-311-1/+22
| | | | | | to the root window (global screen) .. .. otherwise, we might end up receiving a client position of 0/0, while being positioned in a different absolute place within root.
* NEWT MonitorDevice: Fix pixelScale storage, own float[2], don't reuse given ↵Sven Gothel2023-01-311-1/+5
| | | | object
* NEWT Screen: Cleanup get*Monitor*() methodsSven Gothel2023-01-311-15/+25
|
* NEWT: MonitorDevice: Add monitor-name, maybe an empty string. Implemented ↵Sven Gothel2023-01-3121-45/+144
| | | | for X11 and Windows for now.
* NEWT WindowImpl: Bring back DEBUG output on positionChanged(..)Sven Gothel2023-01-311-1/+1
|
* NEWT Regression: Move superSizeChangedOffThread() back to iOS/MacOS ↵Sven Gothel2023-01-313-15/+27
| | | | | | | | WindowDriver, used to call the super class method. Regression of commit cfc35549810d3a0fb5eeb866c9450417e48cd8a1 Note to myself: You can't enforce a 'this' method call overridden with a virtual from a subclass.
* Fix comment for WindowImpl.insets: value is in window unitsSven Gothel2023-01-311-1/+1
|
* NEWT Soft-PixelScale (p6): Implement Soft-PixelScale for X11 and Windows ... ↵Sven Gothel2023-01-3120-58/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (working state) Both: - Using Soft-PixelScale mode, i.e. converting all given window-units to pixel-units for native GDI/X11 ops - Using scaled pixel-sized surface - Adjusting NEWT's Monitor's window-unit viewport value to pixel-scale For X11: - Using global scale factor from environment variable, either: "GDK_SCALE", "QT_SCALE_FACTOR" or "SOFT_SCALE". The latter is for testing only. See https://wiki.archlinux.org/title/HiDPI For Windows: - Using actual monitor's pixel-scale via native SHC API (Shellscaling API, shcore.dll) Misc: - SurfaceScaleUtils.getGlobalPixelScaleEnv() reads a float value from given env names, first come, first serve - MonitorModeProps.streamInMonitorDevice(..): Add `invscale_wuviewport` argument to scale wuvieport for soft-pixel-scale - TestGearsNEWT: Enhance GL2 demo to be suitable for manual tests, this since my Windows KVM machine doesn't support ES2 - TestGLContextDrawableSwitch10NEWT: Add a few more test constraints .. working Tested: - Manually on a Windows virtual machine (KVM) using - 2 virtualized 'Video QXL' cards and - and 'remote-viewer' to see the 2 monitors since `Virtual Machine Manager` build-in doesn't support - remote-viewer spice://localhost:5917 - Manually on a Linux machine w/ SOFT_SCALE - Both, X11 and Windows - Place window on each monitor - Move window across monitors w/ pixel-scale change (or not) - TODO: Test and fix utilization with AWT, i.e. NewtCanvasAWT
* NEWT Soft-PixelScale (p5): Add WindowImpl.applySoftPixelScale(..) for ↵Sven Gothel2023-01-311-0/+107
| | | | | | | general usage See MonitorDevice.getOrientationTo(MonitorDevice, int[]) to setup the move_diff as added in commit 43dc472c4797f34e4079028a5eb04bc420c11c2a
* NEWT Soft-PixelScale (p4): WindowImpl: Change SetSizeAction to optionally ↵Sven Gothel2023-01-311-10/+35
| | | | | | set a custom position additionally to size This added functionality is desired when adjusting the window position and size when changing the soft-pixel-scale