CN102262508B - Method for generating measuring tool by mouse track - Google Patents

Method for generating measuring tool by mouse track Download PDF

Info

Publication number
CN102262508B
CN102262508B CN2011102057778A CN201110205777A CN102262508B CN 102262508 B CN102262508 B CN 102262508B CN 2011102057778 A CN2011102057778 A CN 2011102057778A CN 201110205777 A CN201110205777 A CN 201110205777A CN 102262508 B CN102262508 B CN 102262508B
Authority
CN
China
Prior art keywords
mouse
rectangle
angled triangle
triangle plate
modification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2011102057778A
Other languages
Chinese (zh)
Other versions
CN102262508A (en
Inventor
丁万年
廖强
何永安
陈日良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Ruida Interactive Polytron Technologies Inc
Returnstar Interactive Technology Group Co ltd
Original Assignee
FUZHOU RETURNSTAR DIGITAL TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FUZHOU RETURNSTAR DIGITAL TECHNOLOGY Co Ltd filed Critical FUZHOU RETURNSTAR DIGITAL TECHNOLOGY Co Ltd
Priority to CN2011102057778A priority Critical patent/CN102262508B/en
Publication of CN102262508A publication Critical patent/CN102262508A/en
Application granted granted Critical
Publication of CN102262508B publication Critical patent/CN102262508B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for generating a measuring tool by a mouse track, which comprises the following steps of: first, building a project engineering and building a canvas window in the project engineering; second, obtaining the operation information of the mouse in the canvas window by an information process function packaged by the canvas window, wherein the operation information includes a position of the mouse when the mouse is pressed down and the positions where the mouse passes at all moments when the mouse is pressed down and dragged; third, calculating the relevant information of images of the measuring tools to be displayed by the obtained operation information of the mouse, wherein the measuring tools include a ruler, a protractor, a thirty-degree right-angle triangular board and a forty-five-degree right-angle triangular board; and at last, displaying the images of the measuring tools to be displayed on the canvas by a drawing function interface provided by a 2D (Two-dimensional) drawing library of the operating system according to the relevant information of the images of the measuring tools. The method for generating the measuring tool by the mouse track generates a measuring tool in an electronic white board via the mouse track so as to use the measuring tool to measure a target.

Description

Generate the method for measurement facility by mouse track
[technical field]
The present invention relates to the electronic whiteboard technical field, relate in particular to a kind of method that generates measurement facility by mouse track.
[background technology]
The electronic whiteboard technology is rapidly developed aspect teaching in recent years, realizes teaching purpose so that instructors not be used under the condition of traditional chalk black.In the process that teacher teaches; usually can relate to the metric form of dean degree unit and other relevant units; this just needs intelligent method of design; measurement facility that can object simulating (such as ruler, protractor, 30 degree right-angle triangles, 45 degree right-angle triangles); utilize measurement facility that target is measured, realize this teaching purpose on the electronic whiteboard thereby be implemented in.Present electronic whiteboard also can't be realized the measurement facility of object simulating, still utilizes measurement facility in kind that target is measured in teaching.
[summary of the invention]
The technical problem to be solved in the present invention is to provide a kind of method by mouse track generation measurement facility, has realized utilizing in electronic whiteboard mouse track to produce measurement facility.
The present invention is achieved in that a kind of method by mouse track generation measurement facility, comprises the steps:
Step 10, establishment projects create a painting canvas window in described projects;
Step 20, utilize the packaged message processing function of painting canvas window, obtain the operation information of mouse on described painting canvas window; Described operation information comprises: the position when mouse is pressed, mouse are pressed the position of each moment mouse process when dragging;
The mouse action information calculations that step 30, utilization are obtained goes out the relevant information that will show each measurement facility figure, and described measurement facility comprises: ruler, protractor, 30 degree modification of right-angled triangle plate, 45 degree modification of right-angled triangle plate;
Step 40, according to the relevant information that will show each measurement facility figure that step 30 obtains, the Picture function interface that utilizes the 2D draw library of operating system to provide is presented at measurement facility figure to display on the painting canvas.
Further, calculating will show that the relevant information concrete steps of ruler instrument figure comprise as follows in the described step 30:
Step 300, computing mouse move the positional distance at place depressed position with mouse;
Step 301, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that length and width all are not equal to zero rectangle;
The length of step 302, the rectangle determined with step 301 is as the length of ruler, with wide as ruler of rectangle wide, and determines the spacing of each scale mark of ruler with the distance of 1 pixel=3 millimeter.
Further, calculating will show that the relevant information concrete steps of protractor instrument figure comprise as follows in the described step 30:
Step 310, computing mouse move the positional distance at place depressed position with mouse;
Step 311, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that one longly is wide 2 times rectangle;
The rectangular base minister's that step 312, usefulness step 311 are determined mid point is as the center of circle of protractor, wide radius as protractor with rectangle, and central angle 180 degree done 180 five equilibriums, and according to formula: x=r * cos (a), y=r * sin (a), wherein a is central angle, r is the protractor radius, calculate the point coordinate (x, y) that each central angle is corresponding on the circular arc.
Further, calculating the relevant information concrete steps that will show 30 degree modification of right-angled triangle plate instrument figures in the described step 30 comprises as follows:
Step 320, computing mouse move the positional distance at place depressed position with mouse;
Step 321, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that an Aspect Ratio is: the rectangle of (radical sign 3)/3;
The length of the rectangle that step 322, usefulness step 321 are determined is as the length of 30 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 30, with the diagonal line of the rectangle hypotenuses as 30 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 30 spend the spacing of each scale mark of modification of right-angled triangle plate.
Further, calculating the relevant information concrete steps that will show 45 degree modification of right-angled triangle plate instrument figures in the described step 30 comprises as follows:
Step 330, computing mouse move the positional distance at place depressed position with mouse;
Step 331, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine an as broad as long rectangle;
The length of the rectangle that step 332, usefulness step 331 are determined is as the length of 45 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 45, with the diagonal line of the rectangle hypotenuses as 45 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 45 spend the spacing of each scale mark of modification of right-angled triangle plate.
The present invention has following advantage: the present invention utilizes the packaged message processing function of painting canvas window, obtains the operation information of mouse on described painting canvas window; And utilizing the mouse action information calculations obtain to go out the relevant information that will show each measurement facility figure, the Picture function interface that utilizes at last the 2D draw library of operating system to provide is presented at measurement facility figure to display on the painting canvas.The present invention has realized utilizing in electronic whiteboard mouse track to produce measurement facility, thereby with measurement facility target is measured; For teachers ' teaching provides convenience.
[description of drawings]
Fig. 1 is the inventive method schematic flow sheet.
[embodiment]
Please refer to shown in Figure 1ly, a kind ofly generate the method for measurement facility by mouse track, comprise the steps:
Step 10, establishment projects create a painting canvas window in described projects;
Step 20, (message processing function that generally obtains mouse comprises: WM_LBUTTONDOWN to utilize the packaged message processing function of delphi developing instrument (it can also use other developing instruments) in the present embodiment, WM_MOUSEMOVE, WM_LBUTTONUP.), obtain the operation information of mouse on described painting canvas window (namely be exactly process mouse press, drag, flick message); Described operation information comprises: the position when mouse is pressed, mouse are pressed the position of each moment mouse process when dragging;
The mouse action information calculations that step 30, utilization are obtained goes out the relevant information that will show each measurement facility figure, and described measurement facility comprises: ruler, protractor, 30 degree modification of right-angled triangle plate, 45 degree modification of right-angled triangle plate;
Step 40, according to the relevant information that will show each measurement facility figure that step 30 obtains, the Picture function interface that utilizes the 2D draw library of operating system to provide is presented at measurement facility figure to display on the painting canvas.
The present invention is for different measurement facilities, and the concrete grammar that calculates the relevant information that will show tolerance tool drawing shape in its step 30 comprises following four kinds:
To show that when calculating the relevant information concrete steps of ruler instrument figure comprise as follows:
Step 300, computing mouse move the positional distance at place depressed position with mouse;
Step 301, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that length and width all are not equal to zero rectangle;
The length of step 302, the rectangle determined with step 301 is as the length of ruler, with wide as ruler of rectangle wide, and determines the spacing of each scale mark of ruler with the distance of 1 pixel=3 millimeter.
To show that when calculating the relevant information concrete steps of protractor instrument figure comprise as follows:
Step 310, computing mouse move the positional distance at place depressed position with mouse;
Step 311, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that one longly is wide 2 times rectangle;
The rectangular base minister's that step 312, usefulness step 311 are determined mid point is as the center of circle of protractor, wide radius as protractor with rectangle, and central angle 180 degree done 180 five equilibriums, and according to formula: x=r * cos (a), y=r * sin (a), wherein a is central angle, r is the protractor radius, calculate the point coordinate (x, y) that each central angle is corresponding on the circular arc.
Comprise as follows when calculating the relevant information concrete steps that will show 30 degree modification of right-angled triangle plate instrument figures:
Step 320, computing mouse move the positional distance at place depressed position with mouse;
Step 321, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that an Aspect Ratio is: the rectangle of (radical sign 3)/3;
The length of the rectangle that step 322, usefulness step 321 are determined is as the length of 30 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 30, with the diagonal line of the rectangle hypotenuses as 30 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 30 spend the spacing of each scale mark of modification of right-angled triangle plate.
Comprise as follows when calculating the relevant information concrete steps that will show 45 degree modification of right-angled triangle plate instrument figures:
Step 330, computing mouse move the positional distance at place depressed position with mouse;
Step 331, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine an as broad as long rectangle;
The length of the rectangle that step 332, usefulness step 331 are determined is as the length of 45 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 45, with the diagonal line of the rectangle hypotenuses as 45 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 45 spend the spacing of each scale mark of modification of right-angled triangle plate.
It is worth mentioning that: among the present invention in the processing to the mark unit length, the information that the present invention directly obtains with mouse, the length of calculating with the range formula of point-to-point transmission is as the value of pixel.For example, 2 A (x, y) on the mouse message of obtaining, B (a, b) calculates this distance of 2 by the range formula of point-to-point transmission so, and the unit that defines this distance is pixel (pix); Simultaneously definition: 1 pixel=3 millimeter (1pix=3mm), thereby mark unit length, if other unit (cm, m, dm) will be scaled millimeter accordingly.
The above only is preferred embodiment of the present invention, and all equalizations of doing according to the present patent application claim change and modify, and all should belong to covering scope of the present invention.

Claims (1)

1. the method by mouse track generation measurement facility is characterized in that: comprise the steps:
Step 10, establishment projects create a painting canvas window in described projects;
Step 20, utilize the packaged message processing function of painting canvas window, obtain the operation information of mouse on described painting canvas window; Described operation information comprises: the position when mouse is pressed, mouse are pressed the position of each moment mouse process when dragging;
The mouse action information calculations that step 30, utilization are obtained goes out the relevant information of each measurement facility figure to display, and described measurement facility comprises: ruler, protractor, 30 degree modification of right-angled triangle plate, 45 degree modification of right-angled triangle plate;
Wherein, the concrete steps of the relevant information of calculating ruler instrument figure to display comprise as follows in the described step 30:
Step 300, computing mouse move the positional distance at place depressed position with mouse;
Step 301, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that length and width all are not equal to zero rectangle;
The length of step 302, the rectangle determined with step 301 is as the length of ruler, with wide as ruler of rectangle wide, and determines the spacing of each scale mark of ruler with the distance of 1 pixel=3 millimeter;
The concrete steps of calculating the relevant information of protractor instrument figure to display in the described step 30 comprise as follows:
Step 310, computing mouse move the positional distance at place depressed position with mouse;
Step 311, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that one longly is wide 2 times rectangle;
The rectangular base minister's that step 312, usefulness step 311 are determined mid point is as the center of circle of protractor, wide radius as protractor with rectangle, and central angle 180 degree done 180 five equilibriums, and according to formula: x=r * cos (a), y=r * sin (a), wherein a is central angle, r is the protractor radius, calculate the point coordinate (x, y) that each central angle is corresponding on the circular arc;
The concrete steps of calculating the relevant information of 30 degree modification of right-angled triangle plate instrument figures to display in the described step 30 comprise as follows:
Step 320, computing mouse move the positional distance at place depressed position with mouse;
Step 321, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine that an Aspect Ratio is:
Figure FDA00002281254400021
Rectangle;
The length of the rectangle that step 322, usefulness step 321 are determined is as the length of 30 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 30, with the diagonal line of the rectangle hypotenuses as 30 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 30 spend the spacing of each scale mark of modification of right-angled triangle plate;
The concrete steps of calculating the relevant information of 45 degree modification of right-angled triangle plate instrument figures to display in the described step 30 comprise as follows:
Step 330, computing mouse move the positional distance at place depressed position with mouse;
Step 331, according to described mouse depressed position coordinate and the mouse position coordinates that moves the place determine an as broad as long rectangle;
The length of the rectangle that step 332, usefulness step 331 are determined is as the length of 45 degree modification of right-angled triangle plate, spend the wide of modification of right-angled triangle plate with the wide of rectangle as 45, with the diagonal line of the rectangle hypotenuses as 45 degree modification of right-angled triangle plate, and determine that with the distance of 1 pixel=3 millimeter 45 spend the spacing of each scale mark of modification of right-angled triangle plate;
The relevant information of step 40, each measurement facility figure to display of obtaining according to step 30, the Picture function interface that utilizes the 2D draw library of operating system to provide is presented at measurement facility figure to display on the painting canvas.
CN2011102057778A 2011-07-21 2011-07-21 Method for generating measuring tool by mouse track Expired - Fee Related CN102262508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102057778A CN102262508B (en) 2011-07-21 2011-07-21 Method for generating measuring tool by mouse track

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102057778A CN102262508B (en) 2011-07-21 2011-07-21 Method for generating measuring tool by mouse track

Publications (2)

Publication Number Publication Date
CN102262508A CN102262508A (en) 2011-11-30
CN102262508B true CN102262508B (en) 2013-03-06

Family

ID=45009148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102057778A Expired - Fee Related CN102262508B (en) 2011-07-21 2011-07-21 Method for generating measuring tool by mouse track

Country Status (1)

Country Link
CN (1) CN102262508B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104620163B (en) * 2012-09-13 2018-03-27 浜松光子学株式会社 Light modulation control method, control program, control device and laser irradiation device
CN103077026A (en) * 2012-12-28 2013-05-01 锐达互动科技股份有限公司 Method for writing under desktop environment of operating system
CN105489070B (en) * 2015-12-29 2019-02-22 智慧方舟科技有限公司 A kind of electronics semicircle ruler system and its working method and building block
CN105489071B (en) * 2015-12-29 2019-01-22 智慧方舟科技有限公司 A kind of electronics ruler system and its working method and building block
CN105513437B (en) * 2015-12-29 2019-04-19 智慧方舟科技有限公司 A kind of electronic compass system and its working method and building block
CN105488828B (en) * 2015-12-29 2019-02-19 智慧方舟科技有限公司 A kind of electronic triangular ruler system and its working method and building block
US10691316B2 (en) * 2016-03-29 2020-06-23 Microsoft Technology Licensing, Llc Guide objects for drawing in user interfaces
CN108733293B (en) * 2018-06-11 2021-09-07 广州视源电子科技股份有限公司 Writing track processing method and device
CN109326150A (en) * 2018-09-20 2019-02-12 广州视源电子科技股份有限公司 Method, device and equipment for realizing protractor tool image and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5374942A (en) * 1993-02-05 1994-12-20 Gilligan; Federico G. Mouse and method for concurrent cursor position and scrolling control
US5633657A (en) * 1994-10-11 1997-05-27 Falcon; Fernando D. Mouse driver arrangement for providing advanced scrolling capabilities to a conventional mouse
CN102073433A (en) * 2009-11-25 2011-05-25 英业达股份有限公司 Frame drawing method and electronic device using same
CN101916166B (en) * 2010-08-19 2013-12-04 中兴通讯股份有限公司 Method for starting application program and mobile terminal

Also Published As

Publication number Publication date
CN102262508A (en) 2011-11-30

Similar Documents

Publication Publication Date Title
CN102262508B (en) Method for generating measuring tool by mouse track
US12112503B2 (en) Method and apparatus for calibrating external parameters of image acquisition device, device and storage medium
CN104391603B (en) A kind of calibration method of touch screen, calibrating installation and calibration system
US9229583B2 (en) Object location determination including writing pressure information of a stylus
CN104007846A (en) Three-dimensional figure generating method and electronic whiteboard system
CN102495687A (en) Method, video terminal and system for realizing simple air mouse
CN102136140A (en) Rectangular pattern-based video image distance detecting method
CN101470548A (en) Method for measuring object dimension and angle through touch screen
CN103747196B (en) A kind of projecting method based on Kinect sensor
CN104809940A (en) Projection device and projection method for geometric solid figure
CN104133565A (en) Real-time laser point tracking man-machine interaction system realized by utilizing structured light technology
CN200975891Y (en) Image measuring instrument
CN104123015A (en) System for simulating laser pen through mobile phone and achieving method of system
CN107255458A (en) A kind of upright projection grating measuring analogue system and its implementation
CN106296657A (en) A kind of method video camera being carried out Fast Calibration based on geometrical principle
CN103034345B (en) Geographical virtual emulation 3D mouse pen in a kind of real space
WO2020208974A1 (en) Reference position setting method and operation detection device
CN102982549B (en) Two concentrically orthogonal with main shaft identical intersecting elliptical solve camera intrinsic parameter
CN108627094A (en) A kind of 3D laser measurement methods of parts height dimension
CN105489071B (en) A kind of electronics ruler system and its working method and building block
CN105488828B (en) A kind of electronic triangular ruler system and its working method and building block
CN207992453U (en) A kind of automatic plane figure plotting board based on two-dimentional rangefinder
CN205334765U (en) Electron ruler system and electromagnetism ruler, electron terminal thereof
TWI431525B (en) Remote display system with synchronizing indicating point function and method thereof
CN109774357B (en) Electromechanical universal curve gauge

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: RETURNSTAR INTERACTIVE TECHNOLOGY GROUP CO., LTD.

Free format text: FORMER NAME: FUJIAN RUIDA INTERACTIVE TECHNOLOGY CO., LTD.

Owner name: FUJIAN RUIDA INTERACTIVE TECHNOLOGY CO., LTD.

Free format text: FORMER NAME: FUZHOU RETURNSTAR DIGITAL TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: Cangshan District of Fuzhou City, Fujian province 350000 to build a new town, Jinshan Road No. 618 Garden State Industrial Park Gulou Park Building No. 8

Patentee after: Fujian Ruida interactive Polytron Technologies Inc.

Address before: Cangshan District of Fuzhou City, Fujian province 350000 to build a new town, Jinshan Road No. 618 Garden State Industrial Park Gulou Park Building No. 8

Patentee before: Fuzhou Returnstar Technology Co.,Ltd.

CP03 Change of name, title or address

Address after: Cangshan District of Fuzhou City, Fujian province 350000 to build a new town, Jinshan Road No. 618, juyuanzhou Industrial Park Gulou Park Building No. 8

Patentee after: RETURNSTAR INTERACTIVE TECHNOLOGY GROUP Co.,Ltd.

Address before: Cangshan District of Fuzhou City, Fujian province 350000 to build a new town, Jinshan Road No. 618 Garden State Industrial Park Gulou Park Building No. 8

Patentee before: Fujian Ruida interactive Polytron Technologies Inc.

CP02 Change in the address of a patent holder

Address after: 350108 6, No. 1 Innovation Park, No. 3 east science and technology road, Minhou street, Minhou, Fuzhou.

Patentee after: RETURNSTAR INTERACTIVE TECHNOLOGY GROUP Co.,Ltd.

Address before: 350000 8 tower building, Orange Garden Industrial Park, 618 Jinshan Road, Jianxin Town, Cangshan District, Fuzhou, Fujian.

Patentee before: RETURNSTAR INTERACTIVE TECHNOLOGY GROUP Co.,Ltd.

CP02 Change in the address of a patent holder
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130306