video_border(BMAP* border,var x,var y,var dx,var dy)

Sets a border overlay for the video window, and gives a size for the active area within the border. The black areas of the border image are transparent on the desktop; this way arbitrarily shaped windows or panels can be created. A8.00

Parameters:

x left distance of the active area from the border.
x top distance of the active area from the border.
dx width of the active area.
dy height of the active area.

Remarks:

Modifies:

pRectTarget set to the active area.
screen_size set to the border image size.

Speed:

Slow

Example:

// digital clock on an arbitrarily shaped panel
function main()
{
// create a border image  
  video_border(bmap_create("minipan.pcx"),360,10,240,50);
// the clock panel gets a cutout from the border image, in the same size as the active area
  PANEL* clock = pan_create(NULL,0);
  clock.bmap = bmap_create("minipan.pcx#360#10#240#50");
// set the digits  
  FONT* clockfont = font_create("Arial#50bi");
  pan_setdigits(clock,0,20,0,"%02.f :", clockfont, 1, sys_hours);   
  pan_setdigits(clock,0,100,0,"%02.f :", clockfont, 1, sys_minutes);   
  pan_setdigits(clock,0,180,0,"%02.f", clockfont, 1, sys_seconds);   
  pan_setcolor(clock,1,1,COLOR_GREEN);
  pan_setcolor(clock,1,2,COLOR_BLUE);
  pan_setcolor(clock,1,3,COLOR_RED);
  set(clock,SHOW);
}

See also:

video_switch, video_window, video_set, pRectTarget

► latest version online