Commit 0b348f1a authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

fade with black backward play

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60246 954022d7-b5bf-4e40-9824-e11837661b57
parent e82c85fe
......@@ -392,6 +392,8 @@ function CTransitionAnimation(htmlpage)
_ctx1.fillRect(0, 0, oThis.DemonstrationObject.Canvas.width, oThis.DemonstrationObject.Canvas.height);
}
if (!oThis.IsBackward)
{
if (null != oThis.CacheImage1.Image)
{
_ctx1.drawImage(oThis.CacheImage1.Image, oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
......@@ -404,6 +406,13 @@ function CTransitionAnimation(htmlpage)
_ctx1.beginPath();
}
}
else
{
_ctx1.fillStyle = "rgb(0,0,0)";
_ctx1.fillRect(oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
_ctx1.beginPath();
}
}
var _ctx2 = null;
if (oThis.DemonstrationObject == null)
......@@ -442,6 +451,8 @@ function CTransitionAnimation(htmlpage)
_ctx2.globalAlpha = 1;
}
else if (oThis.Param == c_oAscSlideTransitionParams.Fade_Through_Black)
{
if (!oThis.IsBackward)
{
if (oThis.Params.IsFirstAfterHalf)
{
......@@ -489,6 +500,64 @@ function CTransitionAnimation(htmlpage)
_ctx2.beginPath();
}
}
}
else
{
if (oThis.Params.IsFirstAfterHalf)
{
if (_part < 0.5)
{
var _ctx1 = null;
if (null == oThis.DemonstrationObject)
{
// отрисовываем на основной канве картинку первого слайда
_ctx1 = oThis.HtmlPage.m_oEditor.HtmlElement.getContext('2d');
}
else
{
_ctx1 = oThis.DemonstrationObject.Canvas.getContext('2d');
}
if (null != oThis.CacheImage1.Image)
{
_ctx1.drawImage(oThis.CacheImage1.Image, oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
}
else
{
var _c = oThis.CacheImage1.Color;
_ctx1.fillStyle = "rgb(" + _c.r + "," + _c.g + "," + _c.b + ")";
_ctx1.fillRect(oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
_ctx1.beginPath();
}
oThis.Params.IsFirstAfterHalf = false;
}
}
if (!oThis.Params.IsFirstAfterHalf)
{
_ctx2.globalAlpha = (2 * _part);
_ctx2.fillStyle = "rgb(0,0,0)";
_ctx2.fillRect(oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
_ctx2.beginPath();
}
else
{
_ctx2.globalAlpha = (2 * (_part - 0.5));
if (null != oThis.CacheImage2.Image)
{
_ctx2.drawImage(oThis.CacheImage2.Image, oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
}
else
{
var _c = oThis.CacheImage2.Color;
_ctx2.fillStyle = "rgb(" + _c.r + "," + _c.g + "," + _c.b + ")";
_ctx2.fillRect(oThis.Rect.x, oThis.Rect.y, oThis.Rect.w, oThis.Rect.h);
_ctx2.beginPath();
}
}
}
_ctx2.globalAlpha = 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment