aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
* NEWT Soft-PixelScale (p3): WindowImpl.createNativeImpl(..): Add boolean ↵Sven Gothel2023-01-3112-18/+23
| | | | | | positionModified[] return value, allowing to not wait for the previous custom position This is required if createNativeImpl(..) modifies the target position, i.e. due to soft-pixel-scale.
* NEWT Soft-PixelScale (p2): MonitorDevice: Add getOrientationTo(..) to ↵Sven Gothel2023-01-311-0/+54
| | | | | | | | | | | | determine the orientation of this monitor to the other incl. the 'move_diff' move_diff int[2] to store the move delta for each axis from this-monitor to the other This will be utilized when a NEWT window moved across monitors to signal the move_diff, which helps to properly adjust the new position. Tested: All 4 monitor crossings right_of, left_of, above and below. TODO: Test and support a 'diagonal' move, i.e. move_diff on both axis.
* NEWT Soft-PixelScale (p1): WindowImpl: Separate window and pixel units for ↵Sven Gothel2023-01-3123-252/+435
| | | | | | | | | | | | | | | size and position via atomic-replacable int arrays NEWT's Soft-PixelScale supports software pixel-scale by multiplying the underlying surface pixel-size with the scale-factor and dividing the window position and size by same scale-factor. Hence the window position and size space is kept virtually steady at virtually assumed DPI 96 at higher actual screen DPI and the surface size is adjusted. +++ This window- and pixel-unit separation also includes all callbacks for the native driver implementations, hence the changes native code - allowing to determine whether window- or pixel-units were given.
* Fix NewtFactoryAWT: screen.getMonitor(..) -> screen.getMonitorById(..); Misc ↵Sven Gothel2023-01-316-10/+20
| | | | | | | | | | left-over changes .. GDIUtil: Remove uncommented GetMonitorPixelScale(..) point variant JAWTUtil: Clarify Java version comment w/ spacing NEWT Display.getThreadName(): Return 'Thread[0x<hash-value>, <name>]' NEWT Screen: Add getFullyEnteredMonitor(..) NewtCanvasAWT: @SuppressWarnings for determineIfApplet() and use FQN within method
* NativeWindow: Add getBounds() (moved from NEWT Window) and getSurfaceBounds()Sven Gothel2023-01-3111-62/+140
|
* Nativewindow Rectangle*: Add contains, scale*(float..) and make ↵Sven Gothel2023-01-312-17/+71
| | | | union(List<Rectangle*>) public; Fix union/intersection 'off-by-1' for pos2.