# Canvas transparency when the window has a backdrop

**URL:** <https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688>\
**Category:** General\
**Created:** [January 24, 2017, 4:17pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688 "2017-01-24T16:17:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomanV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@RomanV](https://forum.xojo.com/u/RomanV)\
**Post date:** [January 24, 2017, 4:17pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/1 "2017-01-24T16:17:24Z")

</div>

Hey guys… I’ve got a question…

When I draw my canvas on a window with a backdrop the window back color ‘leaks’ thru the unpainted areas of the canvas…

If I remove the backdrop, the canvas is drawn fine…

PICTURE

[http://imgur.com/a/mS92X](http://imgur.com/a/mS92X)

what am I doing wrong ?

I appreciate your valuable help…

ps… geez how do I upload a pic ?

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [January 24, 2017, 4:24pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/2 "2017-01-24T16:24:09Z")

</div>

There’s a lot of funky drawing issues right now, your best bet might be to draw a FillRect with the background color you want the width and height of the canvas, then draw your background image, then draw the rest. That should stop the window from leaking through.

In regard to uploading screenshots, use [http://imgur.com](http://imgur.com) instead

---

<div class="post-metadata">

**Author:** ![RomanV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@RomanV](https://forum.xojo.com/u/RomanV)\
**Post date:** [January 24, 2017, 4:30pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/3 "2017-01-24T16:30:17Z")

</div>

Hey Tim…

What do you mean by ‘there’s a lot of funky drawing issues right now’ ? bugs ?  
You mean that I should literally respect that drawing order ??

Also the IMG tags in the post don’t seem to work with my imgur link…

Thanks!

---

<div class="post-metadata">

**Author:** ![RomanV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@RomanV](https://forum.xojo.com/u/RomanV)\
**Post date:** [January 24, 2017, 5:01pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/4 "2017-01-24T17:01:47Z")

</div>

Found the problem.

It’s the ‘double buffer’ setting. If I unset it, everything is back to normal…  
I don’t understand how double buffer works, but is this a design decision from the Xojo developers?

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 24, 2017, 5:29pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/5 "2017-01-24T17:29:13Z")

</div>

> [@311651:@Roman Varas](#):
>
> I don’t understand how double buffer works, but is this a design decision from the Xojo developers?

This is described in the book “I wish I knew how to program a canvas control on Xojo desktop” , by @Eugene Dakin  
I can recommend reading it.

---

<div class="post-metadata">

**Author:** ![RomanV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@RomanV](https://forum.xojo.com/u/RomanV)\
**Post date:** [January 24, 2017, 5:54pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/6 "2017-01-24T17:54:44Z")

</div>

Well. looks like amazon isn’t selling it 😉

---

<div class="post-metadata">

**Author:** ![RomanV](https://forum.xojo.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@RomanV](https://forum.xojo.com/u/RomanV)\
**Post date:** [January 24, 2017, 5:57pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/7 "2017-01-24T17:57:11Z")

</div>

oh… geeez…it’s serious… I though it was a joke… there’s tons of data in there… I’ll take a look  
Thanks!

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 24, 2017, 6:31pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/8 "2017-01-24T18:31:45Z")

</div>

> [@311667:@Roman Varas](#):
>
> Well. looks like amazon isn’t selling it 😉

[http://xdevlibrary.com/](http://xdevlibrary.com/)

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [January 24, 2017, 7:08pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/9 "2017-01-24T19:08:55Z")

</div>

[quote=311646:@Roman Varas]What do you mean by ‘there’s a lot of funky drawing issues right now’ ? bugs ?  
You mean that I should literally respect that drawing order ??  
[/quote]  
2016r4 switched the drawing engine to Direct2D so a lot of issues have arisen.  
Without details about your situation, the best answer I can give is that.

After uploading to imgur, right click the image, copy the url, and paste here with the img tags.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 24, 2017, 7:32pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/10 "2017-01-24T19:32:06Z")

</div>

On Windows, 2016R4.1 graphics are really not ready. Between Canvas and printing, it is not possible to obtain a professional result.

I have reverted to 2016R3 for now. Even uninstalled 2016R4.1 to avoid it to open when I double click a project.

On Mac, no such issues.

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 24, 2017, 10:34pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/11 "2017-01-24T22:34:00Z")

</div>

[quote=311690:@Michel Bujardet]On Windows, 2016R4.1 graphics are really not ready. Between Canvas and printing, it is not possible to obtain a professional result.

I have reverted to 2016R3 for now. Even uninstalled 2016R4.1 to avoid it to open when I double click a project.[/quote]

Same here.  
Think given this situation we should expect some forecast about when to expect improvements regarding the drawing engine. On Windows we lost something with this migration.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [January 24, 2017, 10:38pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/12 "2017-01-24T22:38:52Z")

</div>

It would have been extremely surprising that such a major change as Direct2D went without some rough edges.

---

<div class="post-metadata">

**Author:** ![Merv\_Pate](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@Merv\_Pate](https://forum.xojo.com/u/Merv_Pate)\
**Post date:** [January 25, 2017, 1:53am UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/13 "2017-01-25T01:53:19Z")

</div>

> [@311668:@Roman Varas](#):
>
> oh… geeez…it’s serious… I though it was a joke

There’s two things we never joke about around here: One, the Canvas and two, Brad.

---

<div class="post-metadata">

**Author:** ![Joost\_Rongen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@Joost\_Rongen](https://forum.xojo.com/u/Joost_Rongen)\
**Post date:** [January 25, 2017, 7:58am UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/14 "2017-01-25T07:58:17Z")

</div>

> [@311735:@Michel Bujardet](#):
>
> It would have been extremely surprising that such a major change as Direct2D went without some rough edges.

Sure. But since it is a subject which forces quite some Windows programmers to skip the latest release, I should expect some information from R&D. Waiting for something is a lot easier when you know at least something about the progress and schedules.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:37pm UTC](https://forum.xojo.com/t/canvas-transparency-when-the-window-has-a-backdrop/35688/15 "2020-10-29T18:37:37Z")

</div>


