Hi:
I'm trying to build a plugin to capture the globalsources.
I was analyzing the information stored in the XElement structure and something intrigued me.
In WINDOWSTUFF.CPP at OBS::EnsureCropValid the data "x", "y", "cx" and "cy" are treated as ints:
{
if(message == WM_LBUTTONUP) {
...
itemElement->SetInt(TEXT("x"), ...);
itemElement->SetFloat(TEXT("crop.left"), item->crop.x);
...
}
but in SCENE.CPP at Scene::InsertImageSource(UINT pos, XElement *sourceElement) they are treated as 'float'.
{
...
float x = sourceElement->GetFloat(TEXT("x"));
float y = sourceElement->GetFloat(TEXT("y"));
float cx = sourceElement->GetFloat(TEXT("cx"), 100);
float cy = sourceElement->GetFloat(TEXT("cy"), 100);
...
}
Probably, I'm confused and it's not a bug, i'm just trying to learn the internal structure, so I can built custom filters (ie, 'sepia', inverted, etc.)
Shader!
I'm trying to build a plugin to capture the globalsources.
I was analyzing the information stored in the XElement structure and something intrigued me.
In WINDOWSTUFF.CPP at OBS::EnsureCropValid the data "x", "y", "cx" and "cy" are treated as ints:
{
if(message == WM_LBUTTONUP) {
...
itemElement->SetInt(TEXT("x"), ...);
itemElement->SetFloat(TEXT("crop.left"), item->crop.x);
...
}
but in SCENE.CPP at Scene::InsertImageSource(UINT pos, XElement *sourceElement) they are treated as 'float'.
{
...
float x = sourceElement->GetFloat(TEXT("x"));
float y = sourceElement->GetFloat(TEXT("y"));
float cx = sourceElement->GetFloat(TEXT("cx"), 100);
float cy = sourceElement->GetFloat(TEXT("cy"), 100);
...
}
Probably, I'm confused and it's not a bug, i'm just trying to learn the internal structure, so I can built custom filters (ie, 'sepia', inverted, etc.)
Shader!