silexlabs/Cocktail — Issue #52: Filling a GraphicDOMElement with a tile image does not work correctly
Author: codam
Created: 2011-12-04 18:03:15+00:00
State: open

When using the following code, the GraphicDOMElement is not filled correctly with the tile image:

graphic.style.height = DimensionStyleValue.length(px(43));
//graphic.height = 43;
graphic.style.width = DimensionStyleValue.percent(100);

graphic.beginFill(FillStyleValue.bitmap(image, true));
graphic.drawRect(0, 0, graphic.width, graphic.height);
graphic.endFill();
graphic.alpha = 1;

The height of the tile image is 43, but the image is repeated on width (correct), but also on height (incorrect).

adding: "graphic.height = 43;" solves the problem