public virtual void EventOccurred(IEventData iEventData, EventType eventType) { if (eventType == EventType.RENDER_PATH) { PathRenderInfo pathInfo = (PathRenderInfo)iEventData; Color colorFill = iEventData.GetGraphicsState().GetFillColor(); Color colorStroke = iEventData.GetGraphicsState().GetStrokeColor(); int pathOperation = pathInfo.GetOperation(); if (!pathInfo.IsPathModifiesClippingPath() && pathOperation != PathRenderInfo.NO_OP) { if (pathOperation == PathRenderInfo.STROKE) { if (!Color.IsWhite(colorStroke.GetColorSpace(), colorStroke.GetColorValue())) { Path path = pathInfo.GetPath().TransformPath(pathInfo.GetCtm(), false); ProcessPathAsline(path, pathInfo.GetLineWidth()); } } else if (pathOperation == PathRenderInfo.FILL) { if (!Color.IsWhite(colorFill.GetColorSpace(), colorFill.GetColorValue())) { Path path = pathInfo.GetPath().TransformPath(pathInfo.GetCtm(), false); ProcessPathAsRectangle(path); } } else if (pathOperation == (int)(PathRenderInfo.STROKE | PathRenderInfo.FILL)) { if (!Color.IsWhite(colorFill.GetColorSpace(), colorFill.GetColorValue())) { Path path = pathInfo.GetPath().TransformPath(pathInfo.GetCtm(), false); ProcessPathAsRectangle(path); } else if (!Color.IsWhite(colorStroke.GetColorSpace(), colorStroke.GetColorValue()) && Color.IsWhite(colorFill.GetColorSpace(), colorFill.GetColorValue())) { Path path = pathInfo.GetPath().TransformPath(pathInfo.GetCtm(), false); ProcessPathAsline(path, pathInfo.GetLineWidth()); } } } } else if (eventType == EventType.RENDER_TEXT) { if (iEventData is AbstractRenderInfo) { ((AbstractRenderInfo)iEventData).PreserveGraphicsState(); textRenderList.Add(iEventData); } } }