web backgrounds
Posted: Sun Dec 29, 2019 8:46 pm
I have one big doubt and problem for me, I tryed since several years use the web background in one program but I haven't got that one background picture of web style is show in all screen program as in a web site, in the web case is more easy the instruction and the browers make the job but with Hollywood I not see and perhaps the routine will be very easy, here is my current code:
I tryed with the For Next even making a mix between the two For Next one for the columns and other for the lines but nothing, where is the key that I don't get see???
Thanks-
Code: Select all
;This background has the size of 113x113 pixels.
@BRUSH 1, "Graficos/BGRosas.jpg", {Loader="inbuilt"}
/**************************************************************************************************/
@DISPLAY {Title="Textura de fondo", Width=640, Height=480, Color=#BLACK, Borderless=False, NoClose=False,
KeepProportions=True, Sizeable=False, NoModeSwitch=True}
/**************************************************************************************************/
BeginRefresh()
Local NumColum=0
Local Columna=0
Local NumLinea=0
Local Fila=0
Local Ancho=GetAttribute(#BRUSH, 1, #ATTRWIDTH) ;Obtenemos el ancho del gráfico.
Local Alto=GetAttribute(#BRUSH, 1, #ATTRHEIGHT) ;Obtenemos el alto del gráfico.
NumColum=Div(640, Ancho) ;Dividimos para saber el número de veces que habría que mostrar el gráfico.
NumColum=Int(NumColum) ;Cogemos el valor entero sin decimales.
NumColum=Add(NumColum, 1) ;Le añadimos 1 para equilibrar los decimales quitados.
NumLinea=Div(480, Alto) ;Dividimos para saber el número de veces que habría que mostrar el gráfico.
NumLinea=Add(NumLinea, 1) ;Le añadimos 1 para equilibrar los decimales quitados.
NumLinea=Int(NumLinea) ;Cogemos el valor entero sin decimales.
;Dibujamos la fila 0 todas las columnas.
/*For LimiteColum=0 To NumColum
DisplayBrush(1, Columna, Fila)
Columna=Add(Columna, Ancho)
Next*/
;Dibujamos la columna 0 todas las filas.
For LimiteFila=0 To NumLinea
DisplayBrush(1, Columna, Fila)
Fila=Add(Fila, Alto)
Next
EndRefresh()
EscapeQuit(True)
Repeat
WaitEvent
Forever
Thanks-