I am trying to make a PR which sets ctx.setImageSmoothingEnabled(this.model.smoothing) in bokeh/image.ts at e8b22ef161bae542ca06fe77cb12129ca7e3d870 · bokeh/bokeh · GitHub
This being my first dive into the bokeh codebase, my plan/strategy was pretty much to find places in the code base where global_alpha
is defined and define smoothing
similarly these places.
I have found the following places:
$ grep -ri "global_alpha" .
./bokeh/models/glyphs.py: _args = ('image', 'x', 'y', 'dw', 'dh', 'global_alpha', 'dilate')
./bokeh/models/glyphs.py: global_alpha = Float(1.0, help="""
./bokeh/models/glyphs.py: _args = ('image', 'x', 'y', 'dw', 'dh', 'global_alpha', 'dilate')
./bokeh/models/glyphs.py: global_alpha = Float(1.0, help="""
./bokeh/models/glyphs.py: _args = ('url', 'x', 'y', 'w', 'h', 'angle', 'global_alpha', 'dilate')
./bokeh/models/glyphs.py: global_alpha = Float(1.0, help="""
./bokeh/plotting/helpers.py: # Assign global_alpha from alpha if glyph type is an image
./bokeh/plotting/helpers.py: kwargs['global_alpha'] = kwargs['alpha']
./bokehjs/src/lib/models/glyphs/image.ts: this.connect(this.model.properties.global_alpha.change, () => this.renderer.request_render())
./bokehjs/src/lib/models/glyphs/image.ts: ctx.globalAlpha = this.model.global_alpha
./bokehjs/src/lib/models/glyphs/image.ts: global_alpha: p.Property<number>
./bokehjs/src/lib/models/glyphs/image_base.ts: global_alpha: p.Property<number>
./bokehjs/src/lib/models/glyphs/image_base.ts: global_alpha: [ p.Number, 1.0 ],
./bokehjs/src/lib/models/glyphs/image_rgba.ts: this.connect(this.model.properties.global_alpha.change, () => this.renderer.request_render())
./bokehjs/src/lib/models/glyphs/image_rgba.ts: ctx.globalAlpha = this.model.global_alpha
./bokehjs/src/lib/models/glyphs/image_rgba.ts: global_alpha: p.Property<number>
./bokehjs/src/lib/models/glyphs/image_url.ts: this.connect(this.model.properties.global_alpha.change, () => this.renderer.request_render())
./bokehjs/src/lib/models/glyphs/image_url.ts: ctx.globalAlpha = this.model.global_alpha
./bokehjs/src/lib/models/glyphs/image_url.ts: global_alpha: p.Property<number>
./bokehjs/src/lib/models/glyphs/image_url.ts: global_alpha: [ p.Number, 1.0 ],
./bokehjs/test/models/glyphs/image_url.ts: it("should have global_alpha=1.0", () => {
./bokehjs/test/models/glyphs/image_url.ts: expect(image_url.global_alpha).to.be.equal(1.0)
./examples/models/file/image_url.py:image1 = ImageURL(url="url", x="x1", y="y1", w="w1", h="h1", anchor="center", global_alpha=0.2)
./tests/unit/bokeh/models/test_glyphs.py: "global_alpha",
./tests/unit/bokeh/models/test_glyphs.py: "global_alpha",
./tests/unit/bokeh/models/test_glyphs.py: assert glyph.global_alpha == 1.0
./tests/unit/bokeh/models/test_glyphs.py: "global_alpha",
Will this work at all or is it just to naive and will not work at all?