Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
Changing Opacity of Text and Text Bacground separately in Fabric JS

I am adding text to the Canvas using Fabric JS.

let text = new fabric.IText('My Text', {
    fill: 'black',
    fontSize: 40,
    textBackgroundColor: 'yellow'
})

canvas.add(text);

If I change Opacity of text like this:

 text.set({'opacity': 0});

It also changes the Opacity of Text Background which I do not want. I want to change the Opacity of Text without changing it's background.

Actually, I want to punch out Text or you can say set text opacity to '0' with out changing Backgound of text.

Like This:

enter image description here

Is there any way I can do that?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda