Languages

Menu
Sites
Language
can we draw a rectangle in webview

Hi All,

can we draw a rentangle and can we fill it with some color in web control form.

Is it posssible can any one explain?

Thanks

Rajyalakshmi

Responses

1 Replies
Alex Dem

Hi
Using [Native example]-> [WebViewer] I was able to draw filled rectangle on parent  of Web control this way (parent is Tizen::Ui::Controls::Form):
  Canvas*  pCanvas= __pMainForm->GetCanvasN();
  pCanvas->SetBackgroundColor(Color::GetColor(COLOR_ID_WHITE));
  pCanvas->Clear();
  pCanvas->FillRectangle(Color::GetColor(COLOR_ID_GREEN), Rectangle(10, 160, 380, 80));
  pCanvas->Show();

Via __pWeb->GetCanvasN method I was able to get valid Canvas (with real bounds) for Web control child also (see Tizen::Web::Controls::Web class) but I did not find way how to draw on it. Not sure that it is possible.

Alexey.