Thank you. I have found several other issues you may want to look as I was trying to get this to work.
Detailed below:
CSSLayEngine line 268:
Images appear to have words and are not handled correctly. I added a check FlowBox if an image.
In general this code does not handle other measurement units very well. I made a couple of changes more are necessary. I think it is good to normalize on pixels as you have started to do.
In CSSLengeth I added, this would need to be completed for other units
public int GetLengthInPX()
If it is not a percentage use the normalized pixel size. This type of change probably needs to be applied in other areas.
CssValueParser I modified IsValidLength to handle non int as needed for other units:
line 47 and 48:
float stub;
return float.TryParse(number, out stub);
also modified line 152 mm to pixel is 3.78 factor
factor = 3.78f; //3.78 pixels per millimeter
Detailed below:
CSSLayEngine line 268:
Images appear to have words and are not handled correctly. I added a check FlowBox if an image.
In general this code does not handle other measurement units very well. I made a couple of changes more are necessary. I think it is good to normalize on pixels as you have started to do.
In CSSLengeth I added, this would need to be completed for other units
public int GetLengthInPX()
{
switch (_unit)
{
case CssUnit.Milimeters:
return (int)(_number*3.78f);
}
return 0;
}
This is used in CssLayoutEngineTable on line354:If it is not a percentage use the normalized pixel size. This type of change probably needs to be applied in other areas.
CssValueParser I modified IsValidLength to handle non int as needed for other units:
line 47 and 48:
float stub;
return float.TryParse(number, out stub);
also modified line 152 mm to pixel is 3.78 factor
factor = 3.78f; //3.78 pixels per millimeter