Questions tagged [globalcompositeoperation]

54 questions
6
votes
1 answer

Masking multiple shapes using globalCompositeOperation in canvas

I am attempting to draw multiple rectangles and then mask those using globalCompositeOperation 'source-in' which works great, but the issue is that when i fill my rectangles they disappear... If I only have one fill() call they all draw properly but…
Drew Dahlman
  • 4,952
  • 1
  • 22
  • 34
4
votes
1 answer

how to make a hole through only overlay Rectangle using fabric js?

I am working on image cropper using fabric js version 1.7.22. As usually, every cropper display black transparent overlay over the image (where image look like dull), and also display one Rect. (crop Area where image look full with color). we can…
Mayur Kukadiya
  • 2,461
  • 1
  • 25
  • 58
4
votes
1 answer

Using image mask with globalCompositeOperation on KonvaJS?

I am using Konva.js framework and trying to apply an image mask over an other one. The code is fully copied from this post. In this jsfiddle example there is small modifications to add a background (Rect). The problem is that the background is not…
3
votes
1 answer

Custom globalCompositeOperation in html5 Canvas

I'm looking at all of the different types of global composite operations here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation None of them do exactly what I want to do. Is there a way to define a…
3
votes
1 answer

Canvas globalCompositeOperation issue on Samsung galaxy s3 4.1.1 & 4.1.2

I'm trying to create a small drawing application for android browsers. However I've got issues when trying to erase a bitmap using globalCompositeOperation = "destination-out", it simply does not work on the Samsung Galaxy S3 The exact same code…
Andreas
  • 51
  • 2
3
votes
2 answers

After using the globalCompositeOperation "destination-out", how can I get the outline to enclose the new shape?

I have an arc with a blue outline and then a circle covering part of the arc using the global composite operator "destination-out", resulting in part of the arc being canceled out / cut off, but that leaves part of the new shape without an outline,…
01AutoMonkey
  • 2,515
  • 4
  • 29
  • 47
2
votes
0 answers

How do I paint different images using globalCompositeOperation

I've recently trying to make a world map game using tiles, so, I want the images to have different colors, for example, a tile to be as the color of the country. So, the globalCompositeOperation applies the same color to all the images, what did I…
2
votes
2 answers

JS: How to get list of supported HTML canvas globalCompositeOperation types

I want to make a HTML select list, with which I can choose which type of globalCompositeOperation will be applied when blending two canvas elements, like this: