Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebased version of beta 0.20 #3113

Merged
merged 164 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
b1d9d63
squash merge jw/gl_linux_hidpi
jkrumbiegel Mar 31, 2023
56cda4c
Fix mesh/surface with NaN points #2598
SimonDanisch Aug 1, 2023
79839c5
Camera3D Improvements #2746
SimonDanisch Aug 1, 2023
e933fbd
merge jk/html-png-display + highdpi adjustments
jkrumbiegel Mar 31, 2023
6a4f605
Fix errors and bugs
ffreyer Jul 12, 2023
2859548
early attr conversion + no proxy scene anymore #3082
SimonDanisch Aug 1, 2023
4610ead
add remaining changes from beta-0.20
SimonDanisch Aug 1, 2023
91fd2dc
dont be unfair to master
SimonDanisch Aug 1, 2023
0bcb774
use same resolution as master
SimonDanisch Aug 1, 2023
d20bf7a
squash merge jw/gl_linux_hidpi
jkrumbiegel Mar 31, 2023
f8f3436
Fix mesh/surface with NaN points #2598
SimonDanisch Aug 1, 2023
819d823
Camera3D Improvements #2746
SimonDanisch Aug 1, 2023
76803fc
merge jk/html-png-display + highdpi adjustments
jkrumbiegel Mar 31, 2023
5fb4809
Fix errors and bugs
ffreyer Jul 12, 2023
8c16d51
early attr conversion + no proxy scene anymore #3082
SimonDanisch Aug 1, 2023
030ee50
add remaining changes from beta-0.20
SimonDanisch Aug 1, 2023
d0141a8
dont be unfair to master
SimonDanisch Aug 1, 2023
7148081
use same resolution as master
SimonDanisch Aug 1, 2023
ee4f0cd
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Aug 16, 2023
67526c8
Merge branch 'master' into sd/beta-20
SimonDanisch Aug 16, 2023
6c8e73d
Merge branch 'master' into sd/beta-20
SimonDanisch Aug 21, 2023
bc5ea90
Refactor SurfaceLike trait (#3106)
ffreyer Aug 29, 2023
ee7b06d
merge master
SimonDanisch Aug 29, 2023
b3f0c1e
Merge branch 'master' into sd/beta-20
SimonDanisch Aug 29, 2023
bc0f611
Rework WGLMakie lines (#3062)
SimonDanisch Aug 30, 2023
53e36f6
Merge branch 'master' into sd/beta-20
jkrumbiegel Aug 30, 2023
4d1fff9
only run on push
SimonDanisch Aug 30, 2023
55fc71b
fix tests
SimonDanisch Aug 30, 2023
2c17d78
forgot save
SimonDanisch Aug 30, 2023
100b0fa
try using the ReferenceTests from monorepo proj
SimonDanisch Aug 30, 2023
bdf24b1
add to project
SimonDanisch Aug 30, 2023
f641310
wrong ReferenceTests
SimonDanisch Aug 31, 2023
48ed0f9
merge master
SimonDanisch Aug 31, 2023
916d76f
clean up ReferenceTests import + env
SimonDanisch Aug 31, 2023
fc34a87
fix transformation
SimonDanisch Aug 31, 2023
bb6b9d4
fix default axis for mesh2d/poly
SimonDanisch Aug 31, 2023
24d8e28
fix CairoMakie
SimonDanisch Aug 31, 2023
b92bf1f
clean up ppu and add test for it
SimonDanisch Aug 31, 2023
ae0227d
run on pull_request
SimonDanisch Sep 1, 2023
086f3e6
fix test
SimonDanisch Sep 1, 2023
e4ea128
tweak px_per_unit handing in GLMakie & revert hardcoded camera test (…
ffreyer Sep 1, 2023
cd6a946
Merge branch 'master' into sd/beta-20
SimonDanisch Sep 1, 2023
e63f08a
fix merge conflicts
SimonDanisch Sep 12, 2023
6471996
fix plot!(...)
SimonDanisch Sep 18, 2023
d4f6ce8
merge master
SimonDanisch Sep 18, 2023
a801d21
rename
SimonDanisch Sep 18, 2023
110667b
merge master
SimonDanisch Sep 25, 2023
331bf32
fixes
SimonDanisch Sep 25, 2023
2f5c659
Merge branch 'master' into sd/beta-20
SimonDanisch Sep 25, 2023
9a980cf
fix used_attributes
SimonDanisch Sep 25, 2023
1bae189
fix stress test and only caclulate camvalues once
SimonDanisch Sep 25, 2023
10cd1e1
fix tests
SimonDanisch Sep 26, 2023
98da09b
[WIP] Dynamic `PlotList` recipe which plots arbitrary arrays of PlotS…
asinghvi17 Sep 27, 2023
3db88eb
Merge branch 'master' into sd/beta-20
SimonDanisch Sep 27, 2023
ef760db
directly add transformation to attributes
SimonDanisch Sep 27, 2023
ccc4acd
Merge branch 'master' into sd/beta-20
SimonDanisch Sep 27, 2023
bf2e25b
clean up transformation
SimonDanisch Sep 27, 2023
f1cfcaa
remove unused function
SimonDanisch Oct 4, 2023
42757b0
merge master
SimonDanisch Oct 5, 2023
e163fc8
didn't save
SimonDanisch Oct 5, 2023
8ac92a8
merge master
SimonDanisch Oct 13, 2023
722c659
Improve default near/far (#3293)
ffreyer Oct 16, 2023
8a19965
skip camera update with 0 width limits
ffreyer Oct 16, 2023
bf3f264
clean up and leak fixes
SimonDanisch Oct 16, 2023
13ee240
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Oct 16, 2023
b0d5f68
make test more robust
SimonDanisch Oct 17, 2023
ace5d6a
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 18, 2023
b601917
use Ramstepper for comparing images
SimonDanisch Oct 18, 2023
f24e890
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 19, 2023
bef85c0
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 20, 2023
acf468d
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Oct 20, 2023
03ec3b9
cycle color for error and range bars (#3230)
ErickChacon Oct 23, 2023
63fd2fa
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 24, 2023
a7ef010
Consider marker bbox in meshscatter data_limits (#3310)
ffreyer Oct 24, 2023
8a4b343
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 24, 2023
f77e9e4
Blockspec (#3281)
SimonDanisch Oct 28, 2023
ac1b645
fix marker outlines & simplify shader a little
ffreyer Oct 29, 2023
3a39210
remove old depreactions
SimonDanisch Oct 30, 2023
609ff2c
merge master
SimonDanisch Oct 30, 2023
537c258
fix depreactaed import
SimonDanisch Oct 30, 2023
1b14c15
fix cycler + cycled for specapi
SimonDanisch Oct 30, 2023
7160cad
Improve figure size and units explanation documentation (#3322)
jkrumbiegel Oct 30, 2023
b82b6f7
Implement multiple lights and more Light types (#3246)
ffreyer Oct 30, 2023
59c4a1d
fix line z
SimonDanisch Oct 31, 2023
5069a96
add OrbitControl camera to fix offline WGL 3d camera
SimonDanisch Oct 31, 2023
8cff709
Merge branch 'master' into sd/beta-20
SimonDanisch Oct 31, 2023
67102ff
Merge branch 'master' into sd/beta-20
SimonDanisch Nov 1, 2023
6a6d1c4
Deprecate `resolution` for `size` (#3343)
jkrumbiegel Nov 1, 2023
078bce0
fix colorbuffer showing screen on second invocation
SimonDanisch Nov 1, 2023
180e218
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 1, 2023
4b90e9b
update on modelmatrix
SimonDanisch Nov 1, 2023
efbe491
fix scene tutorial
SimonDanisch Nov 1, 2023
9b18a74
add depth shift
SimonDanisch Nov 1, 2023
fb69123
fix ssao
SimonDanisch Nov 2, 2023
ff827df
fix for AoG
SimonDanisch Nov 2, 2023
e4df372
scatter 2d in in Inspector as 2d
SimonDanisch Nov 2, 2023
4cdc64d
fix picking, bg color, add parent resizing
SimonDanisch Nov 2, 2023
ef3e08d
Merge branch 'master' into sd/beta-20
SimonDanisch Nov 2, 2023
3876a23
fix DimensionMismatch with cam3d alt-click
ffreyer Nov 2, 2023
fba01ab
round pixel
SimonDanisch Nov 3, 2023
6d2cd2a
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 3, 2023
96b85ee
fix surface sampling in WGLMakie
ffreyer Nov 3, 2023
d7bc868
activate some more refimg tests in WGLMakie
ffreyer Nov 3, 2023
4c77e22
convert to NoShading if shading == false
ffreyer Nov 3, 2023
85ee116
cleanup surface sampling in GLMakie
ffreyer Nov 3, 2023
0c7438e
fix test error
ffreyer Nov 3, 2023
8388a42
rename resize_to_body to resize_to and allow to resize to parent
SimonDanisch Nov 3, 2023
b2ca738
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 3, 2023
dce4f13
fix volume normals (black boxes)
ffreyer Nov 3, 2023
e0bd250
fix black volume on equal values
ffreyer Nov 3, 2023
ce753de
default transform_marker=false for text
SimonDanisch Nov 6, 2023
4808ca9
deprecate px_area and pixelarea in favor of viewport
SimonDanisch Nov 6, 2023
a8b7ae2
update bundle
SimonDanisch Nov 7, 2023
c1f79f4
benchmark with cached screen
SimonDanisch Nov 7, 2023
175cae2
cleanup observables
SimonDanisch Nov 7, 2023
246e0de
fix tests
SimonDanisch Nov 7, 2023
26e5193
Merge branch 'master' into sd/beta-20
SimonDanisch Nov 7, 2023
973f088
what's wrong with CairoMakie!?
SimonDanisch Nov 7, 2023
14dac7a
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 7, 2023
a533985
Add RectLight (#3355)
ffreyer Nov 7, 2023
b4117cc
fix off-by-one in uv color sampling
ffreyer Nov 7, 2023
cfc65fc
Merge branch 'master' into sd/beta-20
SimonDanisch Nov 8, 2023
fe7e494
use px_per_unit=1
SimonDanisch Nov 8, 2023
e3bf390
improve CairoMakie performance
SimonDanisch Nov 8, 2023
fb94c49
use [email protected]
SimonDanisch Nov 8, 2023
b746109
remove JSServe branch
SimonDanisch Nov 8, 2023
f1a76b7
cancel on push
SimonDanisch Nov 8, 2023
3938333
fix RPRMakie
SimonDanisch Nov 8, 2023
6a92512
please the compiler gods!?
SimonDanisch Nov 8, 2023
99ed207
rename VertexBasedGrid -> VertexGrid
ffreyer Nov 8, 2023
6db9547
fix tests
ffreyer Nov 8, 2023
33f899b
add another clipping mode
ffreyer Nov 8, 2023
10d439a
fixes for RPRMakie
SimonDanisch Nov 8, 2023
dc7aaa6
move specapi docs
SimonDanisch Nov 9, 2023
0ffca8c
fix RectLight position
ffreyer Nov 9, 2023
e60185f
improve result printing
SimonDanisch Nov 9, 2023
3dad965
fix missing examplefigure block
ffreyer Nov 9, 2023
8cfd95d
fix docs error
ffreyer Nov 9, 2023
c8e9891
Introduce GridLayoutSpec and make SpecApi 100% declarative
SimonDanisch Nov 10, 2023
5827947
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 10, 2023
a8ec43e
fix tests
SimonDanisch Nov 11, 2023
a1fadc0
fix re-using of layouts + clean up
SimonDanisch Nov 13, 2023
939742a
remove display
SimonDanisch Nov 13, 2023
9e28b73
final tweaks
SimonDanisch Nov 14, 2023
12f93b7
softly deprecate lowercase
SimonDanisch Nov 14, 2023
7b147b5
fix tests
SimonDanisch Nov 14, 2023
e68e089
fix layouting bugs
SimonDanisch Nov 14, 2023
65fa2d7
make wglmakie more stable
SimonDanisch Nov 15, 2023
c7f35bd
improve specapi docs (#3378)
jkrumbiegel Nov 16, 2023
4d4fdf4
delete test file
SimonDanisch Nov 16, 2023
65aec39
implement empty!/delete! for all axes, closing #3376
SimonDanisch Nov 16, 2023
b5eaf40
fix LScene require_update
SimonDanisch Nov 16, 2023
ec6a92d
Merge branch 'sd/beta-20' of https://github.com/MakieOrg/Makie.jl int…
SimonDanisch Nov 16, 2023
7366880
small tweaks
SimonDanisch Nov 16, 2023
365e25e
rename Combined to Plot and improve docs a bit
SimonDanisch Nov 16, 2023
b89455b
use new GridLayoutBasic version to get rid of warning
SimonDanisch Nov 16, 2023
95a0137
fix datashader
SimonDanisch Nov 16, 2023
b0c0c13
fix cycling and test + clean up plotspec diffing
SimonDanisch Nov 16, 2023
35f6753
fix and clean up cycling & gridlayout diffing
SimonDanisch Nov 16, 2023
ca87a7e
remove FigureSpec
SimonDanisch Nov 16, 2023
4c993a2
Hyphen to minus in tick labels (#3379)
jkrumbiegel Nov 17, 2023
de8cb50
clean up deprecations
SimonDanisch Nov 17, 2023
6ed5111
fix wrong shading defaults in arrows
ffreyer Nov 17, 2023
2707505
Merge branch 'master' into sd/beta-20
SimonDanisch Nov 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/compilation-benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- master
- sd/beta-20
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
benchmark:
name: ${{ matrix.package }}
Expand All @@ -26,6 +29,7 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
include-all-prereleases: true
arch: x64
- uses: julia-actions/cache@v1
- name: Benchmark
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wglmakie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '*'
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down
4 changes: 2 additions & 2 deletions CairoMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CairoMakie"
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
author = ["Simon Danisch <[email protected]>"]
version = "0.10.12"
version = "0.11.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -23,7 +23,7 @@ FFTW = "1"
FileIO = "1.1"
FreeType = "3, 4.0"
GeometryBasics = "0.4.1"
Makie = "=0.19.12"
Makie = "=0.20.0"
PrecompileTools = "1.0"
SHA = "0.7, 1.6, 1.7"
julia = "1.3"
Expand Down
2 changes: 1 addition & 1 deletion CairoMakie/src/CairoMakie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Cairo

using Makie: Scene, Lines, Text, Image, Heatmap, Scatter, @key_str, broadcast_foreach
using Makie: convert_attribute, @extractvalue, LineSegments, to_ndim, NativeFont
using Makie: @info, @get_attribute, Combined, MakieScreen
using Makie: @info, @get_attribute, Plot, MakieScreen
using Makie: to_value, to_colormap, extrema_nan
using Makie.Observables
using Makie: spaces, is_data_space, is_pixel_space, is_relative_space, is_clip_space
Expand Down
1 change: 1 addition & 0 deletions CairoMakie/src/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ end

const DISABLED_MIMES = Set{String}()
const SUPPORTED_MIMES = Set([
map(x->string(x()), Makie.WEB_MIMES)...,
"image/svg+xml",
"application/pdf",
"application/postscript",
Expand Down
32 changes: 17 additions & 15 deletions CairoMakie/src/infrastructure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function cairo_draw(screen::Screen, scene::Scene)
end

"""
is_cairomakie_atomic_plot(plot::Combined)::Bool
is_cairomakie_atomic_plot(plot::Plot)::Bool

Returns whether the plot is considered atomic for the CairoMakie backend.
This is overridden for `Poly`, `Band`, and `Tricontourf` so we can apply
Expand All @@ -66,14 +66,14 @@ CairoMakie can treat them as atomic plots and render them directly.
Plots with children are by default recursed into. This can be overridden
by defining specific dispatches for `is_cairomakie_atomic_plot` for a given plot type.
"""
is_cairomakie_atomic_plot(plot::Combined) = isempty(plot.plots) || to_value(get(plot, :rasterize, false)) != false
is_cairomakie_atomic_plot(plot::Plot) = isempty(plot.plots) || to_value(get(plot, :rasterize, false)) != false

"""
check_parent_plots(f, plot::Combined)::Bool
check_parent_plots(f, plot::Plot)::Bool
Returns whether the plot's parent tree satisfies the predicate `f`.
`f` must return a `Bool` and take a plot as its only argument.
"""
function check_parent_plots(f, plot::Combined)
function check_parent_plots(f, plot::Plot)
if f(plot)
check_parent_plots(f, parent(plot))
else
Expand All @@ -87,11 +87,9 @@ end

function prepare_for_scene(screen::Screen, scene::Scene)

# get the root area to correct for its pixel size when translating
root_area = Makie.root(scene).px_area[]

root_area_height = widths(root_area)[2]
scene_area = pixelarea(scene)[]
# get the root area to correct for its size when translating
root_area_height = widths(Makie.root(scene))[2]
scene_area = viewport(scene)[]
scene_height = widths(scene_area)[2]
scene_x_origin, scene_y_origin = scene_area.origin

Expand All @@ -103,7 +101,7 @@ function prepare_for_scene(screen::Screen, scene::Scene)
top_offset = root_area_height - scene_height - scene_y_origin
Cairo.translate(screen.context, scene_x_origin, top_offset)

# clip the scene to its pixelarea
# clip the scene to its viewport
Cairo.rectangle(screen.context, 0, 0, widths(scene_area)...)
Cairo.clip(screen.context)

Expand All @@ -116,15 +114,15 @@ function draw_background(screen::Screen, scene::Scene)
if scene.clear[]
bg = scene.backgroundcolor[]
Cairo.set_source_rgba(cr, red(bg), green(bg), blue(bg), alpha(bg));
r = pixelarea(scene)[]
r = viewport(scene)[]
Cairo.rectangle(cr, origin(r)..., widths(r)...) # background
fill(cr)
end
Cairo.restore(cr)
foreach(child_scene-> draw_background(screen, child_scene), scene.children)
end

function draw_plot(scene::Scene, screen::Screen, primitive::Combined)
function draw_plot(scene::Scene, screen::Screen, primitive::Plot)
if to_value(get(primitive, :visible, true))
if isempty(primitive.plots)
Cairo.save(screen.context)
Expand All @@ -145,11 +143,11 @@ end
# instead of the whole Scene
# - Recognize when a screen is an image surface, and set scale to render the plot
# at the scale of the device pixel
function draw_plot_as_image(scene::Scene, screen::Screen, primitive::Combined, scale::Number = 1)
function draw_plot_as_image(scene::Scene, screen::Screen, primitive::Plot, scale::Number = 1)
# you can provide `p.rasterize = scale::Int` or `p.rasterize = true`, both of which are numbers

# Extract scene width in pixels
w, h = Int.(scene.px_area[].widths)
# Extract scene width in device indepentent units
w, h = size(scene)
# Create a new Screen which renders directly to an image surface,
# specifically for the plot's parent scene.
scr = Screen(scene; px_per_unit = scale)
Expand Down Expand Up @@ -178,3 +176,7 @@ end
function draw_atomic(::Scene, ::Screen, x)
@warn "$(typeof(x)) is not supported by cairo right now"
end

function draw_atomic(::Scene, ::Screen, x::Makie.PlotList)
# Doesn't need drawing
end
2 changes: 1 addition & 1 deletion CairoMakie/src/overrides.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ complex and slower to draw than standard paths with single color.
function draw_plot(scene::Scene, screen::Screen, poly::Poly)
# dispatch on input arguments to poly to use smarter drawing methods than
# meshes if possible
draw_poly(scene, screen, poly, to_value.(poly.input_args)...)
return draw_poly(scene, screen, poly, to_value.(poly.args)...)
end

# Override `is_cairomakie_atomic_plot` to allow `poly` to remain a unit,
Expand Down
6 changes: 6 additions & 0 deletions CairoMakie/src/precompiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ let
include(shared_precompile)
end
end
precompile(draw_atomic_scatter, (Scene, Cairo.CairoContext, Tuple{typeof(identity),typeof(identity)},
Vector{ColorTypes.RGBA{Float32}}, Vec{2,Float32}, ColorTypes.RGBA{Float32},
Float32, BezierPath, Vec{2,Float32}, Quaternionf,
Mat4f, Vector{Point{2,Float32}},
Mat4f, Makie.FreeTypeAbstraction.FTFont, Symbol,
Symbol))
Loading
Loading