EDN Admin
Well-known member
I found information about how to fade images on the net. But it is extremely slow. Here is the code:<br/>
IA is an ImageAttributes variable. matrixEl is the float value that is incremented to fade in the image.<br/>
<br/>
<div style="margin:5px 20px 20px
<div style="margin-bottom:2px Code:
<pre style="margin:0px; padding:4px; border:1px inset currentColor; width:95%; height:205px <div dir="ltr" style="text-align:left <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ]<span style="color:#000000 [<span style="color:#000000 ] colorMatrixElements = <span style="color:#000000 {<br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, matrixEl, <span style="color:#ff0000 0.0f<span style="color:#000000 }, <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f<span style="color:#000000 } <br/><span style="color:#000000 };<br/>ColorMatrix wmColorMatrix = http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new ColorMatrix<span style="color:#000000 (colorMatrixElements<span style="color:#000000 );<br/> <br/>IA.<span style="color:#0000ff SetColorMatrix<span style="color:#000000 (wmColorMatrix, ColorMatrixFlag.<span style="color:#0600ff Default, ColorAdjustType.<span style="color:#0000ff Bitmap<span style="color:#000000 );<br/> <span style="color:#0600ff return IA; [/code]
The code returns the IA and I use a bitmap graphics object to draw it over and over. This method is extremly slow. Is there a much faster way to fade images in and out?
I use large images.
View the full article
IA is an ImageAttributes variable. matrixEl is the float value that is incremented to fade in the image.<br/>
<br/>
<div style="margin:5px 20px 20px
<div style="margin-bottom:2px Code:
<pre style="margin:0px; padding:4px; border:1px inset currentColor; width:95%; height:205px <div dir="ltr" style="text-align:left <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ]<span style="color:#000000 [<span style="color:#000000 ] colorMatrixElements = <span style="color:#000000 {<br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f<span style="color:#000000 },<br/> <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, matrixEl, <span style="color:#ff0000 0.0f<span style="color:#000000 }, <br/> http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new <span style="color:#ff0000 float<span style="color:#000000 [<span style="color:#000000 ] <span style="color:#000000 {<span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 0.0f, <span style="color:#ff0000 1.0f<span style="color:#000000 } <br/><span style="color:#000000 };<br/>ColorMatrix wmColorMatrix = http://www.google.com/search?q=new+msdn.microsoft.com <span style="color:#008000 new ColorMatrix<span style="color:#000000 (colorMatrixElements<span style="color:#000000 );<br/> <br/>IA.<span style="color:#0000ff SetColorMatrix<span style="color:#000000 (wmColorMatrix, ColorMatrixFlag.<span style="color:#0600ff Default, ColorAdjustType.<span style="color:#0000ff Bitmap<span style="color:#000000 );<br/> <span style="color:#0600ff return IA; [/code]
The code returns the IA and I use a bitmap graphics object to draw it over and over. This method is extremly slow. Is there a much faster way to fade images in and out?
I use large images.
View the full article