Skip to content

Commit

Permalink
Fix the bitmap
Browse files Browse the repository at this point in the history
  • Loading branch information
xQwexx committed Apr 6, 2020
1 parent fa78c50 commit afd2736
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Project-Aurora/Project-Aurora/EffectsEngine/EffectLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public EffectLayer(string name, Color color)
if (!rect.IsEmpty)
{
(brush as LinearGradientBrush).TranslateTransform(rect.X, rect.Y);
(brush as LinearGradientBrush).ScaleTransform(rect.Width, rect.Height);
(brush as LinearGradientBrush).ScaleTransform(rect.Width * 100 / effect_config.gradient_size, rect.Height * 100 / effect_config.gradient_size);
}
else
{
Expand Down Expand Up @@ -249,7 +249,7 @@ public EffectLayer(string name, Color color)
y_offset = (rect.Height / 2.0f) * percent;

(brush as PathGradientBrush).TranslateTransform(rect.X + x_offset, rect.Y + y_offset);
(brush as PathGradientBrush).ScaleTransform(rect.Width - (2.0f * x_offset), rect.Height - (2.0f * y_offset));
(brush as PathGradientBrush).ScaleTransform((rect.Width - (2.0f * x_offset)) * 100 / effect_config.gradient_size, (rect.Height - (2.0f * y_offset)) * 100 / effect_config.gradient_size);
}
else
{
Expand All @@ -261,7 +261,7 @@ public EffectLayer(string name, Color color)
if (!rect.IsEmpty)
{
(brush as PathGradientBrush).TranslateTransform(rect.X, rect.Y);
(brush as PathGradientBrush).ScaleTransform(rect.Width, rect.Height);
(brush as PathGradientBrush).ScaleTransform(rect.Width * 100 / effect_config.gradient_size, rect.Height * 100 / effect_config.gradient_size);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public override EffectLayer Render(IGameState gamestate)
float x_pos = (float)Math.Round((Properties.Sequence.freeform.X + Effects.grid_baseline_x) * Effects.editor_to_canvas_width);
float y_pos = (float)Math.Round((Properties.Sequence.freeform.Y + Effects.grid_baseline_y) * Effects.editor_to_canvas_height);

float width = (float)Math.Round((double)(10500.0f - ((Properties.GradientConfig.gradient_size) * 100f)) * Effects.editor_to_canvas_width);
float height = (float)Math.Round((double)(10500.0f - ((Properties.GradientConfig.gradient_size) * 100f)) * Effects.editor_to_canvas_height);
float width = (float)Math.Round((double)(Properties.Sequence.freeform.Width * Effects.editor_to_canvas_width));
float height = (float)Math.Round((double)(Properties.Sequence.freeform.Height * Effects.editor_to_canvas_height));

if (width < 3) width = 3;
if (height < 3) height = 3;
Expand Down

0 comments on commit afd2736

Please sign in to comment.