Skip to content

Commit

Permalink
change rolling direction
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Oct 27, 2023
1 parent e2df684 commit 5441292
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions examples/common/controls/progress_wheel.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,62 +155,68 @@ void progress_wheel_show( progress_wheel_t *ptThis,

tRotationRegion.tSize.iWidth = ((ptRegion->tSize.iWidth + 1) >> 1);
tRotationRegion.tSize.iHeight = ((ptRegion->tSize.iHeight + 1) >> 1);
if(this.fAngle < ARM_2D_ANGLE(90)){

if(this.fAngle > ARM_2D_ANGLE(90.0f)){
arm_2d_region_t tQuater = tRotationRegion;
tQuater.tLocation.iX += ((ptRegion->tSize.iWidth + 1) >> 1);
tQuater.tLocation.iY += ((ptRegion->tSize.iWidth + 1) >> 1);

arm_2dp_fill_colour_with_mask_opacity_and_transform(
&this.tOP[1],
&this.tOP[3],
ptileArcMask,
ptTarget,
&tQuater,
tCentre,
ARM_2D_ANGLE(180),
ARM_2D_ANGLE(90.0f),
this.fScale,
tWheelColour,
chOpacity,
&tTargetCentre);
arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[1]);

arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[3]);
}

if(this.fAngle < ARM_2D_ANGLE(180)){
if(this.fAngle > ARM_2D_ANGLE(180.0f)){
arm_2d_region_t tQuater = tRotationRegion;
tQuater.tLocation.iY += ((ptRegion->tSize.iWidth + 1) >> 1);
tQuater.tLocation.iX += ((ptRegion->tSize.iWidth + 1) >> 1);
tQuater.tLocation.iY += ((ptRegion->tSize.iHeight + 1) >> 1);


arm_2dp_fill_colour_with_mask_opacity_and_transform(
&this.tOP[2],
&this.tOP[1],
ptileArcMask,
ptTarget,
&tQuater,
tCentre,
ARM_2D_ANGLE(270),
ARM_2D_ANGLE(180.0f),
this.fScale,
tWheelColour,
chOpacity,
&tTargetCentre);

arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[2]);
}

arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[1]);

if(this.fAngle < ARM_2D_ANGLE(270)){
}

if(this.fAngle > ARM_2D_ANGLE(270.0)){
arm_2d_region_t tQuater = tRotationRegion;
tQuater.tLocation.iY += ((ptRegion->tSize.iHeight + 1) >> 1);

arm_2dp_fill_colour_with_mask_opacity_and_transform(
&this.tOP[3],
&this.tOP[2],
ptileArcMask,
ptTarget,
&tRotationRegion,
&tQuater,
tCentre,
ARM_2D_ANGLE(0),
ARM_2D_ANGLE(270.0f),
this.fScale,
tWheelColour,
chOpacity,
&tTargetCentre);

arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[2]);
}


arm_2d_op_wait_async((arm_2d_op_core_t *)&this.tOP[3]);
}

if (this.fAngle < ARM_2D_ANGLE(90)) {
tRotationRegion.tLocation.iX += ((ptRegion->tSize.iWidth + 1) >> 1);
Expand All @@ -227,7 +233,7 @@ void progress_wheel_show( progress_wheel_t *ptThis,
ptTarget,
&tRotationRegion,
tCentre,
this.fAngle + ARM_2D_ANGLE(90),
this.fAngle,
this.fScale,
tWheelColour,
chOpacity,
Expand Down

0 comments on commit 5441292

Please sign in to comment.