*On 25/08/2015 at 07:46, ***xxxxxxxx** wrote:

```
void SNodeUserArea::DrawMsg(Int32 x1, Int32 y1, Int32 x2, Int32 y2, const BaseContainer& msg)
{
OffScreenOn();
SetClippingRegion(x1,y1,x2,y2);
//Int32 gridMax = 10000;
//Int32 gridHalfSub = 100;
AutoAlloc<GeClipMap> cm;
if(!cm) return;
//Int32 w, h;
//GetMinSize(w, h);
cm->Init(x2 - x1, y2 - y1, 32);
cm->BeginDraw();
// draw background
cm->SetDrawMode(GE_CM_DRAWMODE_COPY, 255);
cm->SetColor(110, 110, 110, 255);
cm->FillRect(x1, y1, x2, y2);
//draw grids
drawGrid(x1, y1, x2 - x1, y2 - y1, *cm);
//draw wires
if(tempWire)
drawSWireT(tempWire, *cm);
for(int i = 0; i < wires.size(); ++i)
{
drawSWire(wires[i], *cm);
}
cm->SetDrawMode(GE_CM_DRAWMODE_BLEND, 180);
//draw nodes
for(int i = 0; i < nodes.size(); ++i)
{
if(nodes[i].isSelected() == SEVENPHOTONS_NODE_NULL)
drawSNode(nodes[i], *cm);
}
for(int i = 0; i < nodes.size(); ++i)
{
if(nodes[i].isSelected() != SEVENPHOTONS_NODE_NULL)
drawSNode(nodes[i], *cm);
}
cm->SetDrawMode(GE_CM_DRAWMODE_COPY, 255);
if(rectangularSelection)
{
cm->SetColor(0, 0, 0, 255);
Int32 xMin = Min(rsStart.x , rsEnd.x);
Int32 xMax = Max(rsStart.x , rsEnd.x);
Int32 yMin = Min(rsStart.y , rsEnd.y);
Int32 yMax = Max(rsStart.y , rsEnd.y);
cm->Rect(xMin, yMin,xMax, yMax);
}
cm->EndDraw();
BaseBitmap *mBitmap = cm->GetBitmap();
Int32 mw = cm->GetBw();
Int32 mh = cm->GetBh();
DrawBitmap(mBitmap,0,0,mw,mh,0,0,mw,mh,BMP_ALLOWALPHA);
}
```