drawing

Change cut view text in CATIA

你。 提交于 2019-12-11 11:54:02
问题 I'm currently working with CATIA V5, and I want to use Macros (VBA), but I have some problems! My question is: how to change the text of a cut view? (see the picture) I tried to use : myView.Texts.item(1) to access to this "text" but I think that CATIA dont consider it as text ... I want to change this text without the intervention of the user ( without selections), can I do that? 回答1: IME, VBA scripting in drafting workbench is quite tricky at first..."MyTexts" is a collection of DrawingText

Drawing contours retrieved from the binary image

最后都变了- 提交于 2019-12-11 11:39:39
问题 I want use findContours with the binary image, but the callback function causes an error: Invalid address specified to RtlFreeHeap when returning. When i want to use clear() to free the vector<vector<Point> > value, it causes the same exception and the code crashed in free.c at the line: if (retval == 0) errno = _get_errno_from_oserr(GetLastError()); For example: void onChangeContourMode(int, void *) { Mat m_frB = imread("3.jpg", 0); vector<vector<Point>> contours vector<Vec4i> hierarchy;

Delphi - Custom drawing a message list

こ雲淡風輕ζ 提交于 2019-12-11 11:16:55
问题 Please refer to my question asked at tek-tips.com: http://tek-tips.com/viewthread.cfm?qid=1663735&page=1 As I mentioned in a couple of my other threads, I'm building a control to pretty much replicate the SMS text messaging on the iPhone. This consists of simply a bubble on either side of the control containing text. I already have a working version, but need to re-build it from scratch. I'd like some advice on some things... What do you think is the best method to store the list of message

Android dynamic text drawing / touch detection

狂风中的少年 提交于 2019-12-11 10:38:47
问题 I want to display text (relatively large) and determine which character the user touches. I'd also like to embellish the text by drawing a circle (for example) over certain characters. How do I know which characters are at what location? Enforcing monospaced font would be fine if helpful programmatically. Would it also be able to make this one line of text scroll left/right (using touch->slide) and still have touch work to determine the correct character? 回答1: A very broad question, and you

How to change the color of the side view of the star in android?

被刻印的时光 ゝ 提交于 2019-12-11 10:26:52
问题 To see the below image, Masking star And the code is, import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Region; import android.view.View; import android.graphics.Bitmap; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; import android.util.AttributeSet; /** * Created by

How can I get the free drawn lines as a list of lines, where each line is a list of coordinates?

久未见 提交于 2019-12-11 10:24:09
问题 I'm currently thinking about using fabric.js for an on-line handwriting recognition system. For such a system, I would need to send the drawn lines as a list of lines, where each line is a list of points. So if the user has drawn an "x" on the canvas, I would like to get something like this: [ // the first line was the one going from left bottom to right top: [{'x':228, 'y':92}, {'x':229, 'y':90}, {'x':230, 'y':88}, {'x':232, 'y':86}, {'x':235, 'y':84}, {'x':238, 'y':81}, {'x':243, 'y':76}, {

Dedicated drawing surface in Java?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 10:19:52
问题 I want to do efficient 2D drawing in Java. I would like to have some kind of surface which I may draw freely without having to let the view hierarchy traverse and update, which may cause stutter. I have used a JPanel at first and called repaint() but I find it not to be optimal (and it is the reason I ask). The closest thing I have worked with is the Android's SurfaceView and it gives me a dedicated drawing surface. To achieve this dedicated drawing surface, do I need to use OpenGL or is

cleared sketch still on canvas in html5

孤街醉人 提交于 2019-12-11 10:16:22
问题 I just get confused about canvas clear stuff -- the sketch has been cleared from canvas, but when I click the canvas to draw something new, the cleared sketch just come back at the same position again. It looks like the sketch has been saved to some "cookies", which has been reloaded when the next time clicking the canvas or mouse over the canvas. clear.click(function()){ var canvas = document,getElementById('mycanvas'); var context = canvas.getContext('2d'); context.clearRect(0,0,width

JPanel repaint from another class

[亡魂溺海] 提交于 2019-12-11 09:51:24
问题 I have a JPanel which displays an image. In a separate class, I'm reading from an xml file points. I am firstly creating an arraylist of triangles from these points. However I need to show the triangles on the image, i.e. draw them on! (yes this should be simple). But as these points and triangles are created in another class, I do not seem to be able to draw them on the already-displayed image within the GUI class. I have tried creating a ArrayList in the JPanel itself, which I update and

Failing to draw on a Gtk.DrawingArea

ぃ、小莉子 提交于 2019-12-11 08:38:39
问题 I'm not able to draw, i've already read tutorials, i can't find the problem. I simply have a correct UI drawed by Glade. Then i want to draw, for example 50 drawing areas. So i create a Grid with 50 cells; for each cell there is a vertical box (with a drawing area and a label inside each one). But i can't seen anything drawed. class collega_GUI: def __init__(self): try: self.__builder = Gtk.Builder() self.__builder.add_from_file('UI2.glade') self.__Grid = Gtk.Grid() self.__Grid.set_margin