Gradient And Shadow = Bug

Report any Hollywood bugs here
Post Reply
sinisrus
Posts: 269
Joined: Tue Apr 21, 2015 5:43 pm

Gradient And Shadow = Bug

Post by sinisrus » Thu Mar 31, 2016 10:27 am

/* Test Gradient and Shadow */

SetFormStyle(#ANTIALIAS)
SetFillStyle(#FILLGRADIENT, #CONICAL, $00FF00, $000000)
SetFormStyle(#SHADOW, $A9A9A9, 21, #SHDWSOUTHEAST)

/**********************************************************************************/

CreateBrush(1,350,100,#WHITE)

SelectBrush(1)
BOX(50,#CENTER,50,50,#BLACK)
Circle(#CENTER,#CENTER,25,#BLACK)

v = {}
v[0] = 0 ;X1
v[1] = 50 ;Y1
v[2] = 25 ;X2
v[3] = 0 ;Y2
v[4] = 50 ;X3
v[5] = 50 ;Y3
v[6] = 0 ;X4
v[7] = 50 ;Y4
Polygon(#RIGHT-50, #CENTER, v, 4, #BLACK)
EndSelect

/**********************************************************************************/

DIST=0 ROT=0
Function p_Loop()

SetFormStyle(#SHADOW, $A9A9A9, DIST, #SHDWSOUTHEAST)
CreateBrush(1,350,100,#WHITE)
SelectBrush(1)
BOX(50,#CENTER,50,50,#BLACK)
Circle(#CENTER,#CENTER,25,#BLACK)

v = {}
v[0] = 0 ;X1
v[1] = 50 ;Y1
v[2] = 25 ;X2
v[3] = 0 ;Y2
v[4] = 50 ;X3
v[5] = 50 ;Y3
v[6] = 0 ;X4
v[7] = 50 ;Y4
Polygon(#RIGHT-50, #CENTER, v, 4, #BLACK)
EndSelect

DisplayBrush(1,#CENTER,#CENTER)

IF (ROT=0)&(DIST<50)
DIST=DIST+5
IF (DIST=50) THEN ROT=1
ENDIF

IF (ROT=1)&(DIST>0)
DIST=DIST-5
IF (DIST=0) THEN ROT=0
ENDIF

EndFunction

/**********************************************************************************/

SetInterval(1, p_Loop, 1000/25)

/**********************************************************************************/

/* Boucle infinie */
Repeat
WaitEvent
Forever

sinisrus
Posts: 269
Joined: Tue Apr 21, 2015 5:43 pm

Re: Gradient And Shadow = Bug

Post by sinisrus » Thu Mar 31, 2016 11:27 am

I have this bug:
- Shadow and Gradient
- Edge and Gradient
- Shadow and Edge and gradient

only circle is affected

User avatar
airsoftsoftwair
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Gradient And Shadow = Bug

Post by airsoftsoftwair » Thu Mar 31, 2016 5:27 pm

Right, this looks like a bug. Thanks for reporting! I'll fix it.

User avatar
airsoftsoftwair
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Gradient And Shadow = Bug

Post by airsoftsoftwair » Tue Sep 20, 2016 6:14 pm

Code: Select all

- Fix: When using #FILLGRADIENT fill style and #ANTIALIAS and #SHADOW form style with one of the
  Arc(), Circle(), Ellipse() or Box() with round corners commands, the gradient wasn't drawn
  correctly

Post Reply