A system for generating a combined display image, the system comprising: a touch panel, a display panel, an application processor, a touch path module, a lookup table generator, a control module, and a rendering module; wherein the touch path module is adapted to: receive a plurality of touch events from the touch panel and generate a touch path based on the touch events; wherein the lookup table generator is adapted to: determine a plurality of points defining a boundary of a shape, wherein each of the points comprises a row coordinate, and wherein the shape is determined based on the touch path of the touch path module and a line width parameter received from the application processor; classify the points as one or more of left-edge points and right-edge points; sort the left-edge points by the row coordinate; and sort the right-edge points by the row coordinate; wherein the control module is adapted, for each row of the plurality of rows of the combined display image, to: determine a start entry based on a left intersection between a current row and an edge defined by a first left-edge point of the left-edge points and a second, adjacent left-edge point of the left-edge points; determine a stop entry based on a right intersection between the current row and an edge defined by a first right-edge point of the right-edge points and a second, adjacent right-edge point of the right-edge-points; and generate (558, 857) a row mask comprising a plurality of entries for the current row based on the start entry and the stop entry, wherein each of the entries of the row mask has a first mask value or a second mask value, and wherein each of the entries of the row mask between the start entry and the stop entry has the first mask value; wherein the rendering module is adapted to: receive a video image from the application processor; receive the row mask from the control module; combine the video image with overlay data for the current row in accordance with the row mask to generate the combined display image, wherein the combined display image comprises a plurality of rows and the rendering module is adapted to output the overlay data to the display panel when a corresponding entry of the row mask has the first value; and to output the video image to the display panel when the corresponding entry of the row mask has the second value. a touch panel, a display panel, an application processor, a touch path module, a lookup table generator, a control module, and a rendering module; receive a plurality of touch events from the touch panel and generate a touch path based on the touch events; determine a plurality of points defining a boundary of a shape, wherein each of the points comprises a row coordinate, and wherein the shape is determined based on the touch path of the touch path module and a line width parameter received from the application processor; classify the points as one or more of left-edge points and right-edge points; sort the left-edge points by the row coordinate; and sort the right-edge points by the row coordinate; determine a start entry based on a left intersection between a current row and an edge defined by a first left-edge point of the left-edge points and a second, adjacent left-edge point of the left-edge points; determine a stop entry based on a right intersection between the current row and an edge defined by a first right-edge point of the right-edge points and a second, adjacent right-edge point of the right-edge-points; and generate (558, 857) a row mask comprising a plurality of entries for the current row based on the start entry and the stop entry, wherein each of the entries of the row mask has a first mask value or a second mask value, and wherein each of the entries of the row mask between the start entry and the stop entry has the first mask value; receive a video image from the application processor; receive the row mask from the control module; combine the video image with overlay data for the current row in accordance with the row mask to generate the combined display image,